CFNetwork: POST request connection reset by peer, error not conveyed
CFNetwork: POST request connection reset by peer, error not conveyed
- Subject: CFNetwork: POST request connection reset by peer, error not conveyed
- From: Daniel Jalkut <email@hidden>
- Date: Thu, 11 Aug 2011 12:16:46 -0400
I am running into a situation where my attempt to POST to a server (Tumblr, as it happens) is sometimes met by an immediate, header-free HTML response.
When the POST is short and sweet, CFNetwork picks up on this situation and conveys a posix error 54:
"HTTP download error -- POSIX error: Connection reset by peer. -- URL: http://marstesting.tumblr.com/api/write code: 54"
However, when the POST contains any significant length of data (not much, maybe just enough to exceed one send buffer?), I can see on the wire that the server has abruptly terminated the connection, but CFNetwork continues trying to POST my data, and doesn't convey a reset by peer error. Eventually it finishes posting all the data, but then gets stuck, apparently waiting on some confirmation from the server?
Eventually, CFNetwork times out the send and fails with a timeout error instead of the expected reset error. The error content returned by the server is discarded and never conveyed by a "has bytes available" message to the CFNetwork read stream client.
Does this ring a bell for anybody? I wonder if the situation is unique to when the server abruptly resets the connection without sending any headers?
Any tips appreciated,
Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden