osm-spline / xappy.js

Xappy.JS
Other
37 stars 4 forks source link

Return the header once not twice #102

Closed booo closed 13 years ago

booo commented 13 years ago

At the moment I get the xml/json header twice. This is because of a bug in xappy.js.

To reproduce the bug please start the server and use:

wget localhost:8080/node
<?xml version="1.0" standalone="no"?><osm version="0.6" generator="xappy.js v0.2" xapi:planetDate="SELECT planetDate from DATABASE!!!!" xapi:copyright="2011 OpenStreetMap contributors"><node id="1" lat="9.427" lon="51.415" version="1" uid="291857" user="sladda" changeset="123456" timestamp="Thu May 26 2011 18:47:48 GMT+0200 (CEST)"/><node id="2" lat="7.2" lon="53.6" version="1" uid="291857" user="sladda" changeset="123456" timestamp="Thu May 26 2011 18:47:48 GMT+0200 (CEST)"/><node id="3" lat="13.9108" lon="53.875" version="1" uid="291857" user="sladda" changeset="123456" timestamp="Thu May 26 2011 18:47:48 GMT+0200 (CEST)"/><node id="4" lat="7.8526" lon="47.999" version="1" uid="291857" user="sladda" changeset="123456" timestamp="Thu May 26 2011 18:47:48 GMT+0200 (CEST)"/><node id="5" lat="13.4" lon="49.7" version="1" uid="291857" user="sladda" changeset="123456" timestamp="Thu May 26 2011 18:47:48 GMT+0200 (CEST)"/><node id="6" lat="11.52" lon="53.33" version="1" uid="291857" user="sladda" changeset="123456" timestamp="Thu May 26 2011 18:47:48 GMT+0200 (CEST)"/><node id="7" lat="11.7" lon="48.13" version="1" uid="291857" user="sladda" changeset="123456" timestamp="Thu May 26 2011 18:47:48 GMT+0200 (CEST)"/>HTTP/1.1 200 OK
Content-Type: application/xml
Connection: close

<?xml version="1.0" standalone="no"?><osm version="0.6" generator="xappy.js v0.2" xapi:planetDate="SELECT planetDate from DATABASE!!!!" xapi:copyright="2011 OpenStreetMap contributors"><node id="1" lat="9.427" lon="51.415" version="1" uid="291857" user="sladda" changeset="123456" timestamp="Thu May 26 2011 18:47:48 GMT+0200 (CEST)"/><node id="2" lat="7.2" lon="53.6" version="1" uid="291857" user="sladda" changeset="123456" timestamp="Thu May 26 2011 18:47:48 GMT+0200 (CEST)"/><node id="3" lat="13.9108" lon="53.875" version="1" uid="291857" user="sladda" changeset="123456" timestamp="Thu May 26 2011 18:47:48 GMT+0200 (CEST)"/><node id="4" lat="7.8526" lon="47.999" version="1" uid="291857" user="sladda" changeset="123456" timestamp="Thu May 26 2011 18:47:48 GMT+0200 (CEST)"/><node id="5" lat="13.4" lon="49.7" version="1" uid="291857" user="sladda" changeset="123456" timestamp="Thu May 26 2011 18:47:48 GMT+0200 (CEST)"/><node id="6" lat="11.52" lon="53.33" version="1" uid="291857" user="sladda" changeset="123456" timestamp="Thu May 26 2011 18:47:48 GMT+0200 (CEST)"/><node id="7" lat="11.7" lon="48.13" version="1" uid="291857" user="sladda" changeset="123456" timestamp="Thu May 26 2011 18:47:48 GMT+0200 (CEST)"/></osm>

Please check the usage of the callbacks in xappy.js. Thx Lusy.