[mod_python] Can't get a 206 (partial content) response

Mike Looijmans nlv11281 at natlab.research.philips.com
Tue Jul 3 03:39:24 EDT 2007


For most streaming clients, a simple workaround to disable chunking is to set a Content-Length of 
some arbitrary large number (2GB or so), and add the "Connection: Close" header to the output. Most 
streaming players will accept this. The length will be ignored by the media player anyway.

If the device really wants the HTTP/1.0 in the header, you can change the httpd.conf file of Apache 
to force output to 1.0 for certain client strings. I don't recall the particulars, but there was 
example code in the default config file in apache 2.

Mike Looijmans
Philips Natlab / Topic Automation


yubing wrote:
> 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 ?




More information about the Mod_python mailing list