Hi, I have the same problem with the symbol "|" in URLs. I am using LWP in a
script that checks a list of URLs and returns the download time. If the URL
contains the symbol "|", it will think that it is a pipe and I will get the
following output:
www:~/pl$ ./t.pl http://207.211.106.40/?adserv|2.0|2|28243|1|1|ADFORCE
bash: 2.0: command not found
bash: 2: command not found
bash: 28243: command not found
bash: 1: command not found
bash: 1: command not found
bash: ADFORCE: command not found
Broken Pipe
But if I add the symbol "\" befre each "|", it will work fine:
~/pl$ ./t.pl http://207.211.106.40/?adserv\|2.0\|2\|28243\|1\|1\|ADFORCE
OK
0.73 11.2kb: http://fp.cache.imgis.com/images/dadc_recycle_ban2.gif
Would you please help me? I can't add the symbol "\" manually, because I
have lots of URLs that get changed all the time and I can't search for each
"|"
Any suggestions are highly appreciated.
Jumana S.
----------------------------------------------------------------------------
------------------------------------------
Tatarskih Denis <[EMAIL PROTECTED]> writes:
> I have problem with using some symbols in arguments for cgi-scripts.
> If I use '|' in
> ...
> $rq = new HTTP::Request('GET',
'http://www.somewhere.com/cgi-script?arg1&|arg2');
> ...
> server recieve request 'GET /cgi-script?arg1&%7Carg2 HTTP/1.0', but if I
> type the same URL in location bar of browser (Netscape, Lynx, Konquerror),
> server recieve it as is (/cgi-script?arg1&|arg2).
> Analogically, if I use NetCat ( nc www.somewhere.com 80 < request_file )
>
> Of course, I can use NetCat, but could somebody help me, how I can do it
> with LWP?
The problem is that "|" is not a legal URI character, and LWP will
always let URI.pm fix its URIs before sending them off to the server.
There is no easy way to avoid that with LWP.
Why does it matter?
Regards,
Gisle