Stas Bekman wrote:
hi stas
i/we should probably spend our time on other stuff, but for
the sake of argument ... :)
allan wrote:
so "/" is not a problem.
why ?
i can see that "/" (like "&") is reserved, thus should be escaped, no?
not necessarily, you have quoted the explanation yourself:
2.2. Reserved Characters
Many URI include components consisting of or delimited by, certain special characters. These characters are called "reserved", since their usage within the URI component is limited to their reserved purpose.
If the data for a URI component would conflict with the reserved purpose, then the conflicting data must be escaped before forming the URI.
Where in this URI :? conflicts with the reserved purpose?
http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer
To me everything after ? is a query string and can include anything at all, as long as the browser doesn't have a problem with it.
wrong (i think :)). how about "&", this should always be & even if every browser in the world understands the query, either you live up to a standard or you don't and you might end up in trouble in the future.
we do encode &'s, I just didn't commit this code yet. added it yesterday.
i actually asked the question on the bbedit-list (my editor) and got this eleborate feedback ...
the simplest solution is to call:
perl -MURI::Escape -le 'print uri_escape("http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer");'
http%3A%2F%2Ftheoryx5.uwinnipeg.ca%2Fcgi-bin%2Fppmserver%3Furn%3A%2FPPMServer
Do you like the URLs look like this? I think URI::Escape is broken, since I don't think it should escape http://. What do you think?
At this moment I do: use constant ENCODE_CHARS => '<>&" '; $val = HTML::Entities::encode($val, ENCODE_CHARS);
I suppose we could use URI to analyze the URI and encode only the query string part.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
