Re: Connection aborted (blank line after headers?)

"Randolf Richardson" <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Organization Inter-Corporate Computer & Network Services
Message-ID <[email protected]>
> 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 - [email protected]
Inter-Corporate Computer & Network Services, Inc.
Beautiful British Columbia, Canada
http://www.inter-corporate.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.