[OSM-dev] gpx upload - big problem

Bernhard zwischenbrugger bz at datenkueche.com
Thu Mar 18 04:28:20 GMT 2010


hi

GPX File upload does not work.
I always get "400 bad request".

I have no idea if there is just one bit wrong or it's completely nonsense.
The Content-length is not clear for me, but multipart/form-data should 
work without content-length.

Is there a way on the server to debug that?

My multipart/form-data look like below. I checked it agains the version 
firefox sends to osm (firebug).

Any idea?

PHP code is in attachment

Bernhard

====================================
Content-Type: multipart/form-data; boundary=---------------------88f5117f17

Content-length: 1052997

-----------------------88f5117f17
Content-Disposition: form-data; name="trace[gpx_file]"; 
filename="iphone.gpx"
Content-Type: application/octet-stream

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="naviread 0.2.1" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns="http://www.topogr
afix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 
http://www.topografix.com/GPX/1/1/gpx.xsd">
<metadata>


....

</trkseg>
</trk>
</gpx>

-----------------------29cb2d8a43
Content-Disposition: form-data; name="trace[description]"

this is a testfile
-----------------------29cb2d8a43
Content-Disposition: form-data; name="trace[tagstring]"

thailand, bangkok
-----------------------29cb2d8a43
Content-Disposition: form-data; name="trace[visibility]"

private
-----------------------29cb2d8a43
Content-Disposition: form-data; name="commit"

hochladen
-----------------------29cb2d8a43--
====================================
-------------- next part --------------
A non-text attachment was scrubbed...
Name: upload.php
Type: application/x-php
Size: 2264 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20100318/2c66b189/attachment.bin>


More information about the dev mailing list