Problem with URL encoding URL::addEscapeChars

According to rfc 1738:

This is implemented correctly, however:

They are:
Dollar (“$”)
Ampersand (“&”)
Plus (“+”)
Comma (“,”)
Forward slash/Virgule (“/”)
Colon (“:”)
Semi-colon (“;”)
Equals (“=”)
Question mark (“?”)
‘At’ symbol (“@”)

So, in a parameter $ and , should be removed from the list of characters that are ok.

As well, it appears that addEscapeChars() is only used on the parameters and not on the url itself.

Ok, gotcha. I’ll get that sorted out.

(It only encodes the parameters because if you’re trying to use a base URL that contains strange chars, then something’s probably gone horribly wrong anyway…)

I also think juce_win32_Network.cpp should change. The encoded URL is passed in, but then it is decoded by InternetCrackUrl before it is passed to HttpOpenRequest. I think the url should be passed to HttpOpenRequest in encoded form.

I’m not sure about ftp, ftp should probably get the url unencoded.

I haven’t looked at the linux/mac code.



Good point, thanks.

Actually, I just checked this and it does already seem to be doing the right thing… Any encoded parameters in the path are still correctly encoded when they reach the HttpOpenRequest stage. Maybe I didn’t quite follow what you’re saying?

It looks like you already fixed this issue, I didn’t have the latest code.