0

I know that, the http clients sends 0x10 0x13 bytes to inform the http server that the request data has finished.

But how the server informs the http clients that the response data has finished? (it sends -1 i.e. <EOF> correct)?

Muhammad Hewedy
  • 29,102
  • 44
  • 127
  • 219

1 Answers1

3

No. HTTP Clients do not send CRLF to the server to indicate that the request is complete, and servers do not send a particular byte sequence to the client to indicate completion. You should read this document: http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4 to understand how clients and servers are able to determine when a request or response is complete. The short summary is that the Content-Length header, Chunked Transfer-encoding terminator, or TCP/IP connection closure are all used as signals.

EricLaw
  • 56,563
  • 7
  • 151
  • 196
  • A more recent explanation is in: http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-16.html#rfc.section.3.3 -- this is intended to clarify RFC 2616 a lot. – Julian Reschke Oct 07 '11 at 16:41