yubing
trueice at gmail.com
Tue Jul 3 03:13:14 EDT 2007
I'm doing flv streaming to the flash player, it seems that the player refuses to play multiple chunked streams (>2). To avoid this, I have to set the response code to HTTP/1.0, and that works fine with php scriptlets with: header("HTTP/1.0 200 OK"); for mod_python, I have to set apache's env like this <Location /live> SetEnv downgrade-1.0 SetEnv force-response-1.0 </Location> Is there any solution to send HTTP/1.0 response in mod_python ? thanks:) On 7/3/07, Graham Dumpleton <graham.dumpleton at gmail.com> wrote: > > On 03/07/07, yubing <trueice at gmail.com> wrote: > > BTW, how can I send a HTTP/1.0 response via a request handler ? the > default > > is HTTP/1.1 :) > > thanks > > What exactly do you mean? Are you simply wanting to disable keep > alive, or something more? > > Please use reply-all to keep discussion in mailing list. > > Graham > > > On 7/3/07, Graham Dumpleton < graham.dumpleton at gmail.com> wrote: > > > > > > On 03/07/07, sliderw hotmail < sliderw at hotmail.com> wrote: > > > > I have this PythonHandler running on Apache 2.2.2 with mod_python > 3.3.1: > > > > > > > > def handler(req): > > > > req.headers_out["Content-Range"] = "bytes 0-9/1234" > > > > req.set_content_length(10) > > > > req.write("x" * 10) > > > > return apache.HTTP_PARTIAL_CONTENT > > > > > > > > When I hit the URL, I expect the HTTP response code to be 206, but > it is > > > > actually 200. > > > > > > > > Am I doing something wrong? > > > > > > Use: > > > > > > def handler(req): > > > req.status = apache.HTTP_PARTIAL_CONTENT > > > req.headers_out["Content-Range"] = "bytes 0-9/1234" > > > req.set_content_length(10) > > > req.write("x" * 10) > > > return apache.OK > > > > > > Calling req.write() flushes the response code and headers, so need to > > > supply status through req.status. > > > > > > Graham > > > _______________________________________________ > > > Mod_python mailing list > > > Mod_python at modpython.org > > > http://mailman.modpython.org/mailman/listinfo/mod_python > > > > > > > > > > > -- > > truly yours > > ice > -- truly yours ice -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20070703/441eea82/attachment.html
|