Eyck has asked for the wisdom of the Perl Monks concerning the following question:
POST /something/fileupload.html^M HTTP/1.1^M Accept: image/pjpeg, */*^M Accept-Language: pl^M Content-Type: multipart/form-data; boundary=---------------------------7d42228760176^Mand outgoing looks like this:
POST /something/fileupload.html HTTP/1.1 Accept: image/pjpeg, */* Accept-Language: pl Content-Type: multipart/form-data; boundary=---------------------------7d42228760176After receiving such request webservers hang, waiting for client to finish... entering '^M' anywhere makes them continue. Question is - how to go about this? My code looks roughly like this:
... I also tried this:@indata=split(/^M/,$data); foreach (@indata) { $dataout.=$_; };
But it seems like the only way to put "^M" character in outgoing string is to@indata=split(/^M/,$data); foreach (@indata) { push @outdata,$_; }; $outdata=join(/^M/,@outdata);
Is there some way to make perl use "^M" in newlines? I already tried setting $/="\r\n";$\="\r\n", but that doesen't change this behaviour.$outdata.="^MHelloWorld^M";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Web and newlines, aka perl vs ^M
by matija (Priest) on Mar 12, 2004 at 11:42 UTC | |
|
Re: Web and newlines, aka perl vs ^M
by bart (Canon) on Mar 12, 2004 at 11:59 UTC | |
|
Re: Web and newlines, aka perl vs ^M
by Eyck (Priest) on Mar 12, 2004 at 11:38 UTC | |
|
Re: Web and newlines, aka perl vs ^M
by iburrell (Chaplain) on Mar 12, 2004 at 22:00 UTC |