It's something related to proxy, and I solved it.
However, I still couldn't upload the photo. Can anyone helps me
explain the differences between to styles of requests:
The first one with json content type, it seems accept my request and
says "No file field with name image1272011090983 in multipart request"
For second one, I try to send multipart request, it responses
"Authentication failed". The sending data are same

POST /social/rpc?oauth_token=1%2FY-
zCDLWDWOU5Tpq3YjWgh25QWUGCp801m721rd30_Rk&oauth_consumer_key=xxxxxxxx.com&oauth_signature_method=HMAC-
SHA1&oauth_timestamp=1272022007&oauth_nonce=d1da8f96bea34c0cb60afe349bf95b74&oauth_version=1.0&oauth_signature=7DUE2QbqAmH1AuoPfMFgaZcDWqk
%3D HTTP/1.1
Content-Type: application/json
X-Orkut-Client-Lib: : 1.0
Content-Length: 198
Host: sandbox.orkut.com
Connection: Close

{"params":
{ "groupId":"@self","userId":"@me","albumId":"5446029385274409861","mediaItem":
{"title":"aaa.jpg","url":"@field:image1272011090983"}},"id":"mediaitems.create","method":"mediaitems.create"}


Response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Date: Fri, 23 Apr 2010 11:23:32 GMT
Expires: Fri, 23 Apr 2010 11:23:32 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0
Server: GSE
Transfer-Encoding: chunked
Via: 1.1 proxy9:8080 (DataReactor/4.0.6)
Connection: close
X-Junk: xxx

88
{"id":"mediaitems.create","error":{"message":"badRequest: No file
field with name image1272011090983 in multipart request.","code":400}}
0




POST /social/rpc?oauth_token=1%2FY-
zCDLWDWOU5Tpq3YjWgh25QWUGCp801m721rd30_Rk&oauth_consumer_key=xxxxxxxx.com&oauth_signature_method=HMAC-
SHA1&oauth_timestamp=1272021095&oauth_nonce=fd557dd2863241c1ad772183e27f8ad2&oauth_version=1.0&oauth_signature=QllLhr4luIr
%2FXAtXw9diXSBz0zU%3D HTTP/1.1
Content-Type: multipart/form-data; boundary=___123456_gw___
X-Orkut-Client-Lib: : 1.0
Content-Length: 290
Host: sandbox.orkut.com
Connection: Close

--___123456_gw___
Content-Disposition: form-data; name="request"

{"params":
{ "groupId":"@self","userId":"@me","albumId":"5446029385274409861","mediaItem":
{"title":"aaa.jpg","url":"@field:image1272011090983"}},"id":"mediaitems.create","method":"mediaitems.create"}
--___123456_gw___--

It responses:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Date: Fri, 23 Apr 2010 11:27:36 GMT
Expires: Fri, 23 Apr 2010 11:27:36 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0
Server: GSE
Transfer-Encoding: chunked
Via: 1.1 proxy9:8080 (DataReactor/4.0.6)
Connection: close
X-Junk: xxx

60
{"id":"mediaitems.create","error":{"message":"unauthorized:
Authentication failed.","code":401}}
0

-- 
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en.

Reply via email to