A strange situation is seen in this case:
- HTTP request is sent with TCP flag NO_DELAY (i.e. Nagle algorithm disabled);
- WireShark does not capture the TCP packet with HTTP verb and headers - only the packet with HTTP body is seen (is the packet lost?);
- Remote host responses with ACK showing that not all data is acknowledged;
- TCP re-transmission occurs, and now HTTP verb and headers are captured by WireShark.
More notes:
- If Nagle algorithm is ON then no packets loss or re-transmission is seen;
- The issue is verified in two distinct networks, so the issue is hardly connected with network environment (except, maybe the fact that hosts are virtual machines);
- Request is made with use of c# HttpClient (.NET 4);
- HTTP body size seems to play role - no issue for relatively small packets.
So it looks like the NO_DELAY causes a strange behavior with lost TCP packet with HTTP headers/verb inside.
Any advice?