menboku/musicsharer — pull request #1 by jinksys (2013-01-14 18:05:03+00:00)
Title: HTTP Status Code 206 Support

Hi menboku,

I'm working on an app that uses ranged requests and I'm using the httpserver script you wrote to help debug ranged file downloads. It's been working great. However, I noticed that ranged downloads wouldn't work. Turns out the server wasn't sending 206 to indicate that it could support the request. I tweaked the code and now ranged requests work. The reason why it didn't work was because I check the response code to make sure it's 206 and not 200. Otherwise, I couldn't provide reliable resumable downloads. It's probably not as important when doing streaming.

Please note: I'm never touched :snake: before so don't expect anything too impressive!