84507

How HTTP Server inform its clients that the response has ended

Question:

I know that, <a href="http://m-hewedy.blogspot.com/2010/05/how-to-know-socket-has-end-of-http.html" rel="nofollow">the http clients sends</a> 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)?

Answer1:

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: <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4" rel="nofollow">http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4</a> 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.

Recommend

  • Mixing cin and getline under Linux and Windows
  • How to check a string does not start with a number in Batch?
  • Get last insert id of Postgresql
  • Is it possible to generate a unique numeric value for each row in an iSeries table without looping?
  • C++ - Is destructor called when a vector holds objects?
  • Negated scanset in fscanf and EOF
  • Request response issues in biztalk
  • Getting NullPointer exception with File.listfiles()
  • Doctrine2 bulk import try to work with another entity
  • Web.config system.webserver errors
  • Convert Type Decimal to Hex (string) in .NET 3.5
  • Spring Cloud Microservice Architecture Confusion
  • Transactional Create with Validation in ServiceStack Redis Client
  • copying resource to sdcard gives a damaged file in android
  • How to know when stdin is empty if it contains EOF?
  • Chrome doesn't support silverlight anymore? How to solve this?
  • Handling un-mapped Rest path
  • FB SDK and cURL: Unknown SSL protocol error in connection to graph.facebook.com:443
  • C# - Is there a limit to the size of an httpWebRequest stream?
  • PHP - How to update data to MySQL when click a radio button
  • Updating server-side rendering client-side
  • How do you troubleshoot character encoding problems?
  • Function pointer “assignment from incompatible pointer type” only when using vararg ellipsis
  • 0x202A in filename: Why?
  • How to pass list parameters for each object using Spring MVC?
  • bootstrap to use multiple ng-app
  • How to get icons for entities from eclipse?
  • Why joiner is not used after Sequence generator or Update statergy
  • File not found error Google Drive API
  • Turn off referential integrity in Derby? is it possible?
  • sending mail using smtp is too slow
  • JaxB to read class hierarchy
  • Easiest way to encapsulate a HTML5 webpage into an android app?
  • Busy indicator not showing up in wpf window [duplicate]
  • costura.fody for a dll that references another dll
  • Observable and ngFor in Angular 2
  • How to Embed XSL into XML
  • UserPrincipal.Current returns apppool on IIS
  • Conditional In-Line CSS for IE and Others?
  • java string with new operator and a literal