[OSM-dev] HTTP error 417 with cURL

Nick Whitelegg nick at hogweed.org
Fri May 11 10:32:31 BST 2007


On Friday 11 May 2007 10:04, you wrote:
> > Tried an empty string and even null, but no luck. Seems I'll have
> > to write the
> > header myself, though the easiest fix is probably to stop lighthttpd
> > rejecting this line :-)
>
> Useful to see this being discussed, as I was trying a node upload for the
> first time and assumed it was me doing something wrong when I was getting
> 417.
>
> One thing you could do (and I'll try) is do an exec of the command line
> cUrl instead of using the function api.
>
> Can people tell me, though, what I should be doing for the XML for the
> node. (i.e. what, in detail, is" node payload" in the 0.4 documentation. In
> particular:
>
> - do I need the <osm> wrapper element, or just the <node> element

As far as I know you need the <osm> as for 0.3, but with 'version=0.4' 
instead.

All you need for a new node is the <osm> and the <node>. Nothing else is 
necessary.

In terms of how the issue with the 417 error was fixed, you need this line:

curl_setopt ($ch, CURLOPT_HTTPHEADER,array("Expect:"));

Nick




More information about the dev mailing list