5

File transfer API returns improperly formed HTTP response?

When posting to the relay api for a file transfer, things work fine however the HTTP response that comes back looks like this (captured live with Wireshark):

**HTTP/1.0 200 Server: YHttpServer Connection: close Content-Type: image/jpeg Content-Length: 3621

**

This is contrary to the API spec which shows an HTTP/1.1 response and its content is obviously wrong (a copy of the content type and length headers from the request into the response.)

Whether this response can be parsed is specific to the http client in use and in our case, the Netty open-source codes treats the response as invalid.

The POST looks like this but with good values:

POST /relay?receiver=xxx&sender=yyy&token=zzz HTTP/1.1 Host: 98.136.112.33 Content-Type: image/jpeg Authorization: OAuth oauth_consumer_key="aaa", oauth_token="bbb", oauth_signature_method="HMAC-SHA1", oauth_signature="ccc", oauth_timestamp="1354721770", oauth_nonce="dddd", oauth_version="1.0" Connection: keep-alive Accept: / User-Agent: NING/1.0 Content-Length: 3621

Any ideas for a workaround?

by
0 Replies

Recent Posts

in Messenger IM SDK