Allow the python SimpleHTTPServer to work with our unit tests
We need to do many of our tests from http:// vs. file:///, which means having access to a web server. Not a problem for most people, but still a bit of setup. It would be nice if we could get the simple python server working with our test suite. To do this we need a few things:
1) Makefile target, maybe 'webserver' or 'test', which fires up a web server in the right dir for running the tests
2) Wiring something like |python -m SimpleHTTPServer 9914|
3) A proper mime-type map via extensions_map so we can serve video, audio, et al
Comments and changes to this ticket
- State changed from assigned to peer-review-requested
- Assigned user cleared.
I spent a bunch of time on this today, and we can sort of do this, not fully. The problem is that browsers want to do range requests for media, and the built-in server in python can't handle that. The Simple in SimpleHTTPServer is meaningful :)
I've thrown together a mime-type friendly python into this patch, which should be useful for us in many cases. We just can't default to it. Props to Bobby for some of the code I stole here.
- State changed from peer-review-requested to review-needs-work
- Assigned user set to David Humphrey
This definitely works, but the directory it serves up is the /tools/ dir can we default this to root at the project root dir?
Also, apologies that this took so long to get reviewed.
- State changed from review-needs-work to peer-review-requested
Updated docs to include Make and httpd.py info:
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Popcorn.js is an HTML5 video framework that lets you bring elements of the web into your videos.
Popcorn.js is a project of Web Made Movies, Mozilla's Open Video Lab.