Building a webserver, client doesn't acknowledge HTTP 200 OK frame.

Posted by Evert on Stack Overflow See other posts from Stack Overflow or by Evert
Published on 2010-04-07T11:43:42Z Indexed on 2010/05/11 10:04 UTC
Read the original article Hit count: 294

Filed under:
|
|

Hi there, I'm building my own webserver based on a tutorial. I have found a simple way to initiate a TCP connection and send one segment of http data (the webserver will run on a microcontroller, so it will be very small)

Anyway, the following is the sequence I need to go through:

  1. receive SYN

  2. send SYN,ACK

  3. receive ACK (the connection is now established)

  4. receive ACK with HTTP GET command

  5. send ACK

  6. send FIN,ACK with HTTP data (e.g 200 OK)

  7. receive FIN,ACK <- I don't recieve this packet!

  8. send ACK

Everything works fine until I send my acknowledgement and HTTP 200 OK message. The client won't send an acknowledgement to those two packages and thus no webpage is being displayed. I've added a pcap file of the sequence how I recorded it with wireshark.

Pcap file: http://cl.ly/5f5 (now it's the right data)

All sequence and acknowledgement numbers are correct, checksum are ok. Flags are also right. I have no idea what is going wrong.

© Stack Overflow or respective owner

Related posts about tcp

Related posts about http