Problem with uploading image via http put and oAuth
suntsu
Registered Users Posts: 37 Big grins
Hi,
I try to upload an image via http put and always get the message "invalid signature"
Is the image binary part of the signature, or does anyone see a mistake in my request?
--Request
POST http://upload.smugmug.com/ HTTP/1.1
Accept: */*
Referer: file:///Applications/Install/80C00191-0676-4E62-97A6-639AC8EEBA07/Install/
Content-Length: 873816
Accept-Encoding: identity
Authorization: OAuth oauth_callback="oob", oauth_consumer_key="xxqfdJitzM1xM2DZ6yJWKudUbwOkcCAt", oauth_nonce="s55tmmg9", oauth_signature="xx7LOU0Mib8gkzXfUU2eVx6u9h8%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1326441989", oauth_token="793a32742cac636eb54604d262f43b0f", oauth_version="1.0"
X-Smug-AlbumID: 20799782
User-Agent: NativeHost
Host: upload.smugmug.com
Connection: Keep-Alive
Pragma: no-cache
/9j/4AAQSkZJRgABAQEB <more image here>
--Response
<?xml version="1.0" encoding="utf-8"?>
41
<rsp stat="fail"><err code="35" msg="invalid signature"/></rsp>
I try to upload an image via http put and always get the message "invalid signature"
Is the image binary part of the signature, or does anyone see a mistake in my request?
--Request
POST http://upload.smugmug.com/ HTTP/1.1
Accept: */*
Referer: file:///Applications/Install/80C00191-0676-4E62-97A6-639AC8EEBA07/Install/
Content-Length: 873816
Accept-Encoding: identity
Authorization: OAuth oauth_callback="oob", oauth_consumer_key="xxqfdJitzM1xM2DZ6yJWKudUbwOkcCAt", oauth_nonce="s55tmmg9", oauth_signature="xx7LOU0Mib8gkzXfUU2eVx6u9h8%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1326441989", oauth_token="793a32742cac636eb54604d262f43b0f", oauth_version="1.0"
X-Smug-AlbumID: 20799782
User-Agent: NativeHost
Host: upload.smugmug.com
Connection: Keep-Alive
Pragma: no-cache
/9j/4AAQSkZJRgABAQEB <more image here>
--Response
<?xml version="1.0" encoding="utf-8"?>
41
<rsp stat="fail"><err code="35" msg="invalid signature"/></rsp>
0
Comments
I've created the Auth header for a GET instead of a POST request.
News about can be found on my website.