[OSM-dev] API 0.4 and HTTP 417

Lars Aronsson lars at aronsson.se
Mon May 7 03:12:49 BST 2007

I was trying to run OJW's coast_upload.pl script.  This worked 
fine last week, and now I have adopted it to OSM API 0.4 (this 
adoption is not yet in SVN).  But I'm getting nothing but HTTP 417 
responses.  That means HTTP_EXPECTATION_FAILED, and looking at the 
Ruby code in the Rails port, this is sent on segment creation if 
the source and destination node are the same.  However, I get this 
error on node creation.

I tried everything, until I desperately tried to change the URL 
from /api/0.4/node/create to /bananas/0.4/node/create and then I 
still got the 417 response.

I guess my request never reaches the Ruby/Rails scripts and their 
elaborate tests.  Instead it's something in the HTTP server that 
returns 417 to me.  This seems to be lighttpd.  Was that the case 
before the Rails port too?

This script is written in Perl with the WWW::Curl::Easy library.
It doesn't set USERAGENT or Content-Type.  This worked fine before 
the Rails port, but now I only get 417 errors.

Any hints are welcome.

  Lars Aronsson (lars at aronsson.se)
  Aronsson Datateknik - http://aronsson.se

More information about the dev mailing list