Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
HTTP
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
HTTP
(section)
Add topic