> Are you really including a space in the URI?
> Never do that: %20 instead: see `perldoc perlfaq9`:
> 
>    How do I decode or create those %-encodings on the web?
> 
>      Here's an example of decoding:
> 
>          $string = 
> 
>"http://altavista.digital.com/cgi-bin/query?pg=q&what=news&fmt=.&q=%2Bcgi-bin+%2Bperl.exe";
>          $string =~ s/%([a-fA-F0-9]{2})/chr(hex($1))/ge;
> 
>      Encoding is a bit harder, because you can't just blindly change all the
>      non-alphanumunder character (`\W') into their hex escapes. It's
>      important that characters with special meaning like `/' and `?' *not* be
>      translated. 

Just the contrary ... this is exactly the reason those characters 
MUST be translated ! But ONLY IF they are part of a query value. 

You should ALWAYS encode the values (and just for sure even the 
names) BEFORE you concatenate them together and with the 
http://server/script? part of the URL. ALWAYS !!!
After you added the path part it's already too late.

I usualy use something like this :

use CGI::Enurl; # http://Jenda.Krynicky.cz

 $url = 'http://www.server.com/path/to/script.pl?' . enurl \%data;

Of course URI::Escape is OK as well :-)

Jenda

== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
: What do people think?
What, do people think?  :-)
             -- Larry Wall in <[EMAIL PROTECTED]>
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to