<br><br><div class="gmail_quote">On Wed, May 28, 2008 at 12:13 PM, Stefan de Konink <<a href="mailto:skinkie@xs4all.nl">skinkie@xs4all.nl</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Wed, 28 May 2008, Stefan de Konink wrote:<br>
<br>
> On Wed, 28 May 2008, Jon Burgess wrote:<br>
><br>
> > How does the content-type for the HTTP download compare to the real API?<br>
> > (try wget -S http://... and compare all the headers)<br>
><br>
</div><div class="Ih2E3d">> skinkie@nemesis ~ $ wget -S<br>
> <a href="http://openstreetmap.org/api/0.5/map?bbox=4.37204339" target="_blank">http://openstreetmap.org/api/0.5/map?bbox=4.37204339</a><br>
> 9272871,52.06894868775914,4.420033124293988,52.11742099102069<br>
> --2008-05-28 11:47:40--<br>
> <a href="http://openstreetmap.org/api/0.5/map?bbox=4.37204339927" target="_blank">http://openstreetmap.org/api/0.5/map?bbox=4.37204339927</a><br>
> 2871,52.06894868775914,4.420033124293988,52.11742099102069<br>
> Resolving openstreetmap.org... <a href="http://128.40.58.202" target="_blank">128.40.58.202</a><br>
> Connecting to <a href="http://openstreetmap.org" target="_blank">openstreetmap.org</a>|<a href="http://128.40.58.202" target="_blank">128.40.58.202</a>|:80... connected.<br>
> HTTP request sent, awaiting response...<br>
>   HTTP/1.0 200 OK<br>
>   Connection: close<br>
>   Content-Type: text/xml; charset=utf-8<br>
>   X-Runtime: 28.31216<br>
>   ETag: "98bab2d1997f8d1d32d6871855c03a6b"<br>
>   Cache-Control: private, max-age=0, must-revalidate<br>
>   Content-Disposition: attachment; filename="map.osm"<br>
>   Content-Length: 2209831<br>
>   Date: Wed, 28 May 2008 09:47:45 GMT<br>
>   Server: lighttpd/1.4.13<br>
> Length: 2209831 (2.1M) [text/xml]<br>
<br>
</div>I have now added:<br>
<div class="Ih2E3d"><br>
  HTTP/1.0 200 OK<br>
  Connection: Keep-Alive<br>
  Keep-Alive: timeout=15<br>
</div>  Date: Wed, 28 May 2008 10:05:27 GMT<br>
<div class="Ih2E3d">  Server: Cherokee/0.7.0 (UNIX)<br>
  Content-Length: 1061096<br>
</div>  Content-Type: text/xml; charset=utf-8<br>
<div class="Ih2E3d">  Content-Disposition: attachment; filename="map.osm"<br>
<br>
</div>But still no can do.<br>
<br>
Java error:<br>
<br>
org.xml.sax.SAXParseException: The processing instruction target matching<br>
<div class="Ih2E3d">"[xX][mM][lL]" is not allowed.<br>
<br>
<br>
</div></blockquote><div>Stefan<br><br>quoting from <a href="http://www.velocityreviews.com/forums/t141650-sax-parser-and-ltxml-versionquot10quot-gt.html">http://www.velocityreviews.com/forums/t141650-sax-parser-and-ltxml-versionquot10quot-gt.html</a>:<br>
<br>"The XML declaration must be the *very first* thing in the XML file (per<br>
the XML spec).  No blank lines, whitespace, control characters, etc. may<br>
precede it.  In other words, the '<' must be at offset 0 from the<br>
beginning of the file.  The error message you describe is typical when<br>
this is not the case." </div><br>Is there any blank space before the XML declaration?<br><br>Regards,<br>Quico<br></div>