Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#9660 closed defect (fixed)

opening a gpx directly from openstreetmap.org does not work for some traces

Reported by: ralfherberer78 Owned by: simon04
Priority: minor Milestone: 14.02
Component: Core Version: tested
Keywords: gpx open download Cc:

Attachments (0)

Change History (7)

comment:1 Changed 6 years ago by Don-vip

Milestone: 14.02

comment:2 Changed 6 years ago by simon04

Owner: changed from team to simon04

Depending on _ (to be determined), the result is bz2 encoded, gzip encoded or not encoded (http below refers to the awesome http://httpie.org/ tool):

$ http --headers http://www.openstreetmap.org/trace/1350010/data
HTTP/1.1 200 OK
Cache-Control: private
Content-Disposition: attachment; filename="1350010.gpx.bz2"
Content-Language: en
Content-Length: 22258
Content-Transfer-Encoding: binary
Content-Type: application/x-bzip2
Date: Sun, 02 Feb 2014 21:29:53 GMT
Server: Apache/2.2.22 (Ubuntu)
Status: 200
Vary: Accept-Language
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.21
X-Request-Id: d7395150-0238-4ae0-86ff-84cfce55b865
X-Runtime: 0.091725
X-UA-Compatible: chrome=1
X-XSS-Protection: 1; mode=block

$ http --headers http://www.openstreetmap.org/trace/1650111/data
HTTP/1.1 200 OK
Cache-Control: private
Content-Disposition: attachment; filename="1650111.gpx.gz"
Content-Language: en
Content-Length: 7801
Content-Transfer-Encoding: binary
Content-Type: application/x-gzip
Date: Sun, 02 Feb 2014 21:31:42 GMT
Server: Apache/2.2.22 (Ubuntu)
Status: 200
Vary: Accept-Language
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.21
X-Request-Id: d2ae7535-0c47-47a9-8e00-a5ce35eaabae
X-Runtime: 0.061435
X-UA-Compatible: chrome=1
X-XSS-Protection: 1; mode=block

$ http --headers http://www.openstreetmap.org/trace/1650114/data
HTTP/1.1 200 OK
Cache-Control: private
Content-Disposition: attachment; filename="1650114.gpx"
Content-Language: en
Content-Length: 103811
Content-Transfer-Encoding: binary
Content-Type: application/gpx+xml
Date: Sun, 02 Feb 2014 21:31:54 GMT
Server: Apache/2.2.22 (Ubuntu)
Status: 200
Vary: Accept-Language
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.21
X-Request-Id: df3a0e09-a9e1-49f3-865a-dd3a81456d86
X-Runtime: 0.055635
X-UA-Compatible: chrome=1
X-XSS-Protection: 1; mode=block
Last edited 6 years ago by simon04 (previous) (diff)

comment:3 Changed 6 years ago by Don-vip

Yes I had a look on this. As stated in osmwiki:API_v0.6#Uploading_traces people can send GPX files or archives in ".tar, .tar.gz or .zip" format, and data returns "the exact file uploaded.".

bzip2 is not mentioned in that list, but it may be supported as well if it's returned for some tracks.

comment:4 Changed 6 years ago by simon04

Resolution: fixed
Status: newclosed

In 6803/josm:

fix #9660 - Allow to download compressed GPX tracks from osm.org/trace/ using "Download location"

This works by inspecting the filename in the Content-Disposition HTTP header.

comment:5 Changed 6 years ago by ralfherberer78

Thank you! But my first and third example which did not work are not compressed. I have not tested it with the new tested version again.

Simon, you do not need an extra tool for inspecting headers if you use modern browsers. E.g. Firefox has such a inspection built-in. Eg. via Ctrl+Shift+K , Console, Network, click on the GET requests.

comment:6 Changed 6 years ago by ralfherberer78

Whyever, this seems to work in version 6815, great!

comment:7 Changed 6 years ago by simon04

Actually I'm not surprised – to make it work was the intent of r6803. Good to know that it really works. :-)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain simon04.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.