<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
I installed a packet sniffer app on my android tablet, then logged-in to osm, started the capture of packets and submitted the gpx_files api call.<br>
<br>
The second response contained the XML tree as per the curl command with the <description>...</description> tag indented on a seperate line :-<br>
<br>
<gpx_file id="..." name="..." user="..." visibility="..." pending="..." timestamp="..." lat="..." lon="..."><br>
  <description>...</description><br>
</gpx_file><br>
<br>
It still seems odd that various Android and Windows apps would extract all of the <description>...</description> tag values and present them before the XML tree.<br>
<br>
But it looks like they do.<br>
<br>
Regards,<br>
<br>
M
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Mike Parfitt <m_parfitt@hotmail.com><br>
<b>Sent:</b> 06 January 2020 12:16:26<br>
<b>To:</b> mmd <mmd.osm@gmail.com><br>
<b>Subject:</b> Re: [OSM-dev] Malformed API results</font>
<div> </div>
</div>
<div>The curl command you used looks very similar to the one generated for me by the app that I used unsuccessfully - probably because curl isn't installed on my tablet, or the command line app didn't know where to look.<br>
<br>
Is it significant that the curl results contain<br>
<br>
<?xml version="1.0" encoding="UTF-8"?><br>
<br>
before the start of the document tree, whereas the browser results have<br>
<br>
This XML file does not appear to have any style information associated with it. The document tree is shown below.<br>
<br>
It puzzles me that multiple non-curl tools on two different platforms would extract the contents of every <description> tag and put them ahead of the document tree in an identical manner.<br>
<br>
Is it possible that curl discards anything that doesn't look like HTML/XML ?  That would explain why curl only shows the XML document tree.
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> mmd <mmd.osm@gmail.com><br>
<b>Sent:</b> 04 January 2020 21:35:23<br>
<b>To:</b> dev@openstreetmap.org <dev@openstreetmap.org><br>
<b>Subject:</b> Re: [OSM-dev] Malformed API results</font>
<div> </div>
</div>
<div class="x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_PlainText">On 2020-01-04 21:38, Mike Parfitt wrote:<br>
> What does curl and wget return for you ?<br>
<br>
Here's the result I got when running:<br>
 curl <a href="https://api.openstreetmap.org/api/0.6/user/gpx_files">https://api.openstreetmap.org/api/0.6/user/gpx_files</a> -u<br>
"some_osm_user_name"<br>
<br>
<?xml version="1.0" encoding="UTF-8"?><br>
<osm version="0.6" generator="OpenStreetMap server"<br>
copyright="OpenStreetMap and contributors"<br>
attribution="<a href="http://www.openstreetmap.org/copyright">http://www.openstreetmap.org/copyright</a>"<br>
license="<a href="http://opendatacommons.org/licenses/odbl/1-0/">http://opendatacommons.org/licenses/odbl/1-0/</a>"><br>
<gpx_file id="..." name="..." user="..." visibility="private"<br>
pending="false" timestamp="..." lat=".." lon="..."><br>
  <description>...</description><br>
</gpx_file><br>
<gpx_file id="..." name="..." user="..." visibility="private"<br>
pending="false" timestamp="..." lat=".." lon="..."><br>
  <description>...</description><br>
</gpx_file><br>
<gpx_file id="..." name="..." user="..." visibility="private"<br>
pending="false" timestamp="..." lat=".." lon="..."><br>
  <description>...</description><br>
</gpx_file><br>
...<br>
</osm><br>
<br>
<br>
You need to replace the user name with your own here, and provide a<br>
password when curl asks you to. The result is an XML document with a<br>
number of gpx_file elements. Note that I replaced some of the field<br>
contents with dummy values above.<br>
<br>
<br>
-- <br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
dev mailing list<br>
dev@openstreetmap.org<br>
<a href="https://lists.openstreetmap.org/listinfo/dev">https://lists.openstreetmap.org/listinfo/dev</a><br>
</div>
</span></font></div>
</div>
</body>
</html>