Re: Connection aborted (blank line after headers?)
Dave Morgan <[email protected]>
| Newsgroups | gmane.comp.apache.mod-perl |
|---|---|
| Message-ID | <[email protected]> |
On 15/11/12 11:40 AM, Randolf Richardson wrote:
Snip.....
>> Pretty well, we also get a similar problem when some IE clients download
>> pictures (jpg's).
>>
>> Software caused connection abort at /home/apache/metapoint/trunk/Metadot/UploadsManager.pm line 216,<OUT> chunk 1.\n
>>
>> The code here is (edited for brevity)
>>
>> open OUT, "<$read_file";
>> binmode (OUT);
>> print $CGI->header(%header_values);
>> {
>> local $/ = undef;
>> while(<OUT>) {
>> print;
>> }
>> }
> [sNip]
>
> One question: Do you need a blank line after the headers to
> differentiate from the content? If $CGI->header isn't providing it,
> then this could explain why the client isn't getting the image, and
> raw binary data where headers are expected could be a problem too.
>
> open OUT, "<$read_file";
> binmode (OUT);
> print $CGI->header(%header_values);
> print "\r\n"; # --- Some systems may only need "\n"
> {
> local $/ = undef;
> while(<OUT>) {
> print;
> }
> }
>
> Consider this to be a random idea that may be worth trying. I hope
> this helps.
Tried in staging, broke everything :) Thanks for the idea.
After further checking the cause does appear to be the client
side aborting. We have checked with the exact clients/systems
reported and everything works properly when we do it so ......
Thanks to all for their help
Dave
--
Dave Morgan
Operations Manager, Cool Places In Canada
http://www.coolplaces.ca
[email protected]
403 288 8759 / 866 938 0516