Opened 13 years ago

Last modified 11 years ago

#8566 closed defect

RemoteControl: import command doesn't properly handle percent-encoded urls — at Version 2

Reported by: tyr_asd Owned by: team
Priority: normal Milestone: 14.01
Component: Core Version: tested
Keywords: overpass api Cc: roland.olbricht

Description (last modified by tyr_asd)

When using the import command of the RemoteControl protocol, JOSM doesn't properly handle already percent-encoded URLs: (This is a regression over what JOSM did a few weeks ago, when I last checked.)

Lets say, I want to load the following URL:

http://www.overpass-api.de/api/interpreter?data=node%5B%22foo%22%5D%3Bout%20meta%3B

Using this URL as the parameter "url" of the import command means that I have to url-encode the whole thing (because "url" is a HTTP-GET parameter):

http://localhost:8111/
GET /import?url=http%3A%2F%2Fwww.overpass-api.de%2Fapi%2Finterpreter%3Fdata%3Dnode%255B%2522foo%2522%255D%253Bout%2520meta%253B

but instead of grabbing the original URL, JOSM does this:

GET http://www.overpass-api.de/api/interpreter?data=node%255B%2522foo%2522%255D%253Bout%2520meta%253B

This looks like JOSM is either doing one superfluous url-encoding step or is missing one internal url-decoding step. I found out that after bug #8148 the code was altered slightly - maybe that could be the cause of this?

Change History (2)

comment:1 by Don-vip, 13 years ago

Cc: roland.olbricht added
Keywords: overpass api added

r5782 (#8505) may be the cause of this behaviour.

comment:2 by tyr_asd, 13 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.