I'm using the Titanium.Network.HTTPClient to send a GET request to my RESTful Service. I noticed a few things:
The HTTPClient's Request headers contains two identical headers of this type:
"Connection: Close". I think its a bug - only a single instance of this header should exist.
When trying to alter the connection from "close" to "keep-alive" :
Is this by design or is it a bug?
Further details regarding the reason I need to use a "keep-alive" connection:
My service returns an ArrayList of objects (as a JSON representation) and for some reason if the request's connection is not set to "keep-alive" the response is 200 OK with empty body.
I can confirm that this is exactly the problem because I "replayed" the request using a sniffer (while changing the connection header) and the response was fixed (I got the JSON in the body)