11.07.2015 Views

Network Working Group R. Fielding Request for Comments: 2616 ...

Network Working Group R. Fielding Request for Comments: 2616 ...

Network Working Group R. Fielding Request for Comments: 2616 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

A client MUST include a Host header field in all HTTP/1.1 requestmessages . If the requested URI does not include an Internet hostname <strong>for</strong> the service being requested, then the Host header field MUSTbe given with an empty value. An HTTP/1.1 proxy MUST ensure that anyrequest message it <strong>for</strong>wards does contain an appropriate Host headerfield that identifies the service being requested by the proxy. AllInternet-based HTTP/1.1 servers MUST respond with a 400 (Bad <strong>Request</strong>)status code to any HTTP/1.1 request message which lacks a Host headerfield.See sections 5.2 and 19.6.1.1 <strong>for</strong> other requirements relating toHost.14.24 If-MatchThe If-Match request-header field is used with a method to make itconditional. A client that has one or more entities previouslyobtained from the resource can verify that one of those entities iscurrent by including a list of their associated entity tags in theIf-Match header field. Entity tags are defined in section 3.11. Thepurpose of this feature is to allow efficient updates of cachedin<strong>for</strong>mation with a minimum amount of transaction overhead. It is alsoused, on updating requests, to prevent inadvertent modification ofthe wrong version of a resource. As a special case, the value "*"matches any current entity of the resource.If-Match = "If-Match" ":" ( "*" | 1#entity-tag )If any of the entity tags match the entity tag of the entity thatwould have been returned in the response to a similar GET request(without the If-Match header) on that resource, or if "*" is given<strong>Fielding</strong>, et al. Standards Track [Page 129]RFC <strong>2616</strong> HTTP/1.1 June 1999and any current entity exists <strong>for</strong> that resource, then the server MAYper<strong>for</strong>m the requested method as if the If-Match header field did notexist.A server MUST use the strong comparison function (see section 13.3.3)to compare the entity tags in If-Match.If none of the entity tags match, or if "*" is given and no currententity exists, the server MUST NOT per<strong>for</strong>m the requested method, andMUST return a 412 (Precondition Failed) response. This behavior ismost useful when the client wants to prevent an updating method, such

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!