smgoller / rangehttpserver

Python module that implements a simple HTTP server that understands the HTTP Range header.
GNU General Public License v2.0
68 stars 18 forks source link

video tag support #1

Closed eba closed 13 years ago

eba commented 13 years ago

Dear smgoller,

Nice to meet you!

I was finding simple http server which be able to check if browser supports video tag of HTML5. And I found your code because it supports range requests and seems very helpful for me.

Actually I modified some code to support mime type for "video/mp4" and "video/ogg" and change http response from 200 to 206.

diff 
123,126c123
<         if "Range" in self.headers:
<             self.send_response(206)
<         else:
<             self.send_response(200)
>         self.send_response(200)
260,261d256
<         '.mp4': 'video/mp4',
<         '.ogg': 'video/ogg',

Would you include my patch?

Regards, eba (from Japan).

smgoller commented 13 years ago

Hi, I've incorporated your patch. (I'm pretty sure I did it right) Please test it and let me know if it's working ok.

eba commented 13 years ago

Dear smgoller,

Thank you very much!! I tested it and it works fine.

Kindly Regards, eba.