Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
HTTP
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Server response === <syntaxhighlight lang="http"> HTTP/1.1 200 OK Date: Mon, 23 May 2005 22:38:34 GMT Content-Type: text/html; charset=UTF-8 Content-Length: 155 Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux) ETag: "3f80f-1b6-3e1cb03b" Accept-Ranges: bytes Connection: close <html> <head> <title>An Example Page</title> </head> <body> <p>Hello World, this is a very simple HTML document.</p> </body> </html> </syntaxhighlight> The [[HTTP ETag|ETag]] (entity tag) header field is used to determine if a cached version of the requested resource is identical to the current version of the resource on the server. <code>"Content-Type"</code> specifies the [[Internet media type]] of the data conveyed by the HTTP message, while <code>"Content-Length"</code> indicates its length in bytes. The HTTP/1.1 [[webserver]] publishes its ability to respond to requests for certain byte ranges of the document by setting the field <code>"Accept-Ranges: bytes"</code>. This is useful, if the client needs to have only certain portions<ref>{{cite IETF |draft=draft-ietf-http-range-retrieval-00 |title=Byte Range Retrieval Extension to HTTP |first1=Ari |last1=Luotonen |first2=John |last2=Franks |publisher=IETF |date=February 22, 1996}}</ref> of a resource sent by the server, which is called [[byte serving]]. When <code>"Connection: close"</code> is sent, it means that the [[web server]] will close the [[Transmission Control Protocol|TCP]] connection immediately after the end of the transfer of this response.<ref name="rfc9112-9.1" /> Most of the header lines are optional but some are mandatory. When header <code>"Content-Length: number"</code> is missing in a response with an entity body then this should be considered an error in HTTP/1.0 but it may not be an error in HTTP/1.1 if header <code>"Transfer-Encoding: chunked"</code> is present. Chunked transfer encoding uses a chunk size of 0 to mark the end of the content. Some old implementations of HTTP/1.0 omitted the header <code>"Content-Length"</code> when the length of the body entity was not known at the beginning of the response and so the transfer of data to client continued until server closed the socket. A <code>"Content-Encoding: [[gzip]]"</code> can be used to inform the client that the body entity part of the transmitted data is compressed by gzip algorithm.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)