[OSM-dev] oAuth PUT not working
osm at stephans-server.de
Mon Jan 16 00:21:22 GMT 2012
thank you for looking into this issue.
On 15.01.2012 20:42, Tom Hughes wrote:
> On 15/01/12 19:26, Stephan Knauss wrote:
>> But why did it respond with "401 Authorization Required"? I guess there
>> are other http status codes more appropriate. Why not "400 Bad Request"?
> Were you perhaps using an XML content type when computing the signature?
> That would lead to a signature mismatch if you then sent a different
> content type to the server.
The signature is computed inside the oauth library. It does all the
magic internally. I just pass my data in. the $changesetRequest contains
the XML of the changeset to create.
It worked in the past. Now I added the Content-Type header. I can't tell
what it is using internally to compute the signature. I saw the
content-type in the header and changed into text/xml as this was working
for JOSM and sounds a lot better than what was sent before.
$ret = $oauth->fetch("$api_url/changeset/create", $changesetRequest,
Could it happen that the signature verification on the server is now
more strict so a thing that worked in the past is now failing?
More information about the dev