I found my connection got packet TCP Reset after I receive packet [FIN,ACK] in every time. I don't understand, why it send TCP Reset packet? This case is the normal or not? Cause my application didn't got error message when I found these packets.
asked 01 Sep '12, 21:09
TCP is a bi-directional protocol. This means that during a connection close sequence, both sides get to say "I'm done sending things now." The connection isn't "down" until both sides have done that, or one side sends a TCP
It is quite possible — and indeed common — for the connection to be half-closed. For example, a simple HTTP 1.0 conversation is a request for information, followed by a response from the server. The client is free to close its sending half of the connection after the request; it won't affect whether the server sends the reply. HTTP 1.1 can be more complex than this, allowing multiple requests and responses on a single connection, but the old one request per connection style is still legal.
Looking at your capture, what I see is that the server sends its
Bottom line, the client has a bug, and needs to be fixed.
RST in response to FIN is an old hack that's still common in http. The concept is basically that http sessions are short-lived, with a single Req/Resp pair (http 1.0). This special case therefore doesn't require TCP's ability to receive data after a FIN is sent, so after the server is done sending the requested content, the browser will send a RST. This bypasses the CLOSE-WAIT and LAST-ACK states on the browser, and triggers the server to bypass the FIN-WAIT-1/FIN-WAIT-2/CLOSING states.
Short answer: when dealing with web browsers, this is common behavior.
answered 04 Dec '13, 16:34