View Single Post

  #2 (permalink)  
Old 03-09-2005
Tim
 
Posts: n/a
Default Re: double escaped spaces in browser url address

On Wed, 09 Mar 2005 01:30:48 +0100,
crc78 <crc78@free.fr> posted:

> I pasting 2 URL in my browser adress bar, one after another.
>
> Both URL have a space character in one of the parameters.
>
> The 2 URL call the same duplicated file (test.php), have the same
> parameters (after the /?), but different domain names
> (http://mysite1.com/ and http://mysite2.com).
>
> Both sites aren't on the same server.


Don't give us excersises like high-school brain teasers. All that
vagueness probably leaves out something we need to know, makes it hard to
give advice, and means your posting will be ignored by a number of people.

> My problem is about space encoding on http://mysite1.com when i submit
> the URL in the address bar of my browser.
> The space in the paramaters is turned to %2520. Why is the space
> character double encoded (space -> %20 -> %2520)


Because it's encoded the percent sign (%20 is a space, %25 is the percent
sign). So some aspect of your process for submitting URIs is doing some
bad encoding.

i.e. It's seening %20 as a percent sign that needs encoding as $25,
followed by the numerals 2 and 0 which don't need encoding.

Depending on what's being encoded where, you might need to encode it
differently, or escape something in your programming so it doesn't get
encoded.

Spaces in URIs are just bad news...

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.