You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ian Pushee <br...@giantsquid.net> on 2005/10/27 19:35:11 UTC

[users@httpd] CGI wierdness

I've got a kind of odd problem that I havn't been able to find mentioned 
any where...
I have a cgi script which outputs motion-jpeg formated video (essential 
as a single long stream of data). My problem is that the indevidual jpeg 
images which makeup the stream are getting corrupted by apache. Each 
image has the string "\r\n2000\r\n" or "\r\n3000\r\n" inserted into it. 
These tags alternate throughout the stream (ie: 2000 in one image, 3000 
in the next, 2000 in the next, etc.). The tags are not at a specific 
location in the image, nor do they seem to follow after any specifc set 
of bytes.
Has any one experienced this before? Does anyone have a solution for 
removing these coruptions?

Any help is appreciated, thanks,
-Ian Pushee

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] CGI wierdness

Posted by Ian Pushee <br...@giantsquid.net>.
Yup, that was the problem -- the program reading my motion JPEGs was 
doing the "request HTTP/1.1 but can't understand HTTP/1.1" thing. So it 
couldn't decode the chunked data. Thanks for the help.

-Ian

Joshua Slive wrote:

>On 10/27/05, Ian Pushee <br...@giantsquid.net> wrote:
>  
>
>>I've got a kind of odd problem that I havn't been able to find mentioned
>>any where...
>>I have a cgi script which outputs motion-jpeg formated video (essential
>>as a single long stream of data). My problem is that the indevidual jpeg
>>images which makeup the stream are getting corrupted by apache. Each
>>image has the string "\r\n2000\r\n" or "\r\n3000\r\n" inserted into it.
>>These tags alternate throughout the stream (ie: 2000 in one image, 3000
>>in the next, 2000 in the next, etc.). The tags are not at a specific
>>location in the image, nor do they seem to follow after any specifc set
>>of bytes.
>>Has any one experienced this before? Does anyone have a solution for
>>removing these coruptions?
>>    
>>
>
>Do you see "Transfer-Encoding: chunked" in the http response headers? 
>If so, you may be seeing the chunk headers which are perfectly normal
>and should be decoded by the browser.
>
>Joshua.
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>  
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] CGI wierdness

Posted by Joshua Slive <js...@gmail.com>.
On 10/27/05, Ian Pushee <br...@giantsquid.net> wrote:
> I've got a kind of odd problem that I havn't been able to find mentioned
> any where...
> I have a cgi script which outputs motion-jpeg formated video (essential
> as a single long stream of data). My problem is that the indevidual jpeg
> images which makeup the stream are getting corrupted by apache. Each
> image has the string "\r\n2000\r\n" or "\r\n3000\r\n" inserted into it.
> These tags alternate throughout the stream (ie: 2000 in one image, 3000
> in the next, 2000 in the next, etc.). The tags are not at a specific
> location in the image, nor do they seem to follow after any specifc set
> of bytes.
> Has any one experienced this before? Does anyone have a solution for
> removing these coruptions?

Do you see "Transfer-Encoding: chunked" in the http response headers? 
If so, you may be seeing the chunk headers which are perfectly normal
and should be decoded by the browser.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org