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!
== HTTP/1.1 response messages <span class="anchor" id="Response_message"></span> == A response message is sent by a server to a client as a reply to its former request message.{{refn|group=note|name=http-23-message}} === Response syntax === A server sends ''response messages'' to the client, which consist of:<ref name="rfc9112-2.1" /> * a '''status line''', consisting of the protocol version, a [[Space (punctuation)|space]], the [[List of HTTP status codes|response status code]], another space, a possibly empty reason phrase, a [[carriage return]] and a [[line feed]], e.g.: *: <syntaxhighlight lang="http"> HTTP/1.1 200 OK </syntaxhighlight> * zero or more [[HTTP response header field|response header fields]], each consisting of the case-insensitive field name, a colon, optional leading [[Whitespace (computer science)|whitespace]], the field value, an optional trailing whitespace and ending with a carriage return and a line feed, e.g.: *: <syntaxhighlight lang="http"> Content-Type: text/html </syntaxhighlight> * an empty line, consisting of a carriage return and a line feed; * an optional [[HTTP message body|message body]]. === Response status codes === {{See also|List of HTTP status codes}} In HTTP/1.0 and since, the first line of the HTTP response is called the ''status line'' and includes a numeric ''status code'' (such as "[[HTTP 404|404]]") and a textual ''reason phrase'' (such as "Not Found"). The response status code is a three-digit integer code representing the result of the server's attempt to understand and satisfy the client's corresponding request. The way the client handles the response depends primarily on the status code, and secondarily on the other response header fields. Clients may not understand all registered status codes but they must understand their class (given by the first digit of the status code) and treat an unrecognized status code as being equivalent to the x00 status code of that class. The standard ''reason phrases'' are only recommendations, and can be replaced with "local equivalents" at the [[web developer]]'s discretion. If the status code indicated a problem, the user agent might display the ''reason phrase'' to the user to provide further information about the nature of the problem. The standard also allows the user agent to attempt to interpret the ''reason phrase'', though this might be unwise since the standard explicitly specifies that status codes are machine-readable and ''reason phrases'' are human-readable. The first digit of the status code defines its class: ; <code>1XX</code> (informational): The request was received, continuing process. ; <code>2XX</code> (successful): The request was successfully received, understood, and accepted. ; <code>3XX</code> (redirection): Further action needs to be taken in order to complete the request. ; <code>4XX</code> (client error): The request contains bad syntax or cannot be fulfilled. ; <code>5XX</code> (server error): The server failed to fulfill an apparently valid request. === Response header fields === {{see also|List of HTTP header fields#Response fields}} The response header fields allow the server to pass additional information beyond the status line, acting as response modifiers. They give information about the server or about further access to the target resource or related resources. Each response header field has a defined meaning which can be further refined by the semantics of the request method or response status code.
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