perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randolf Richardson" <rand...@modperl.pl>
Subject Re: Connection aborted (blank line after headers?)
Date Thu, 15 Nov 2012 18:40:50 GMT
> Thanks Andre.
> 
> On 14/11/12 12:33 PM, André Warnier wrote:
> > Dave Morgan wrote:
> 
> Snip.....
> 
> >
> >> We did find the use statement and removed it. We now get
> >>
> >> Software caused connection abort at
> >> /home/apache/metapoint/trunk/Utility.pm line 231.
> >>
> >
> > Ok, so now you know at which line of which module this issue happens.
> > Is that you only issue (this line in the logs) ?
> 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.

Randolf Richardson - randolf@inter-corporate.com
Inter-Corporate Computer & Network Services, Inc.
Beautiful British Columbia, Canada
http://www.inter-corporate.com/



Mime
View raw message