What is the purpose of the HTTP header field “Content-Location”?

后端 未结 4 500
终归单人心
终归单人心 2020-12-08 04:33

Confused/inspired by a comment to my question Do search engines respect the HTTP header field “Content-Location”?, I’d like to know, what the exact purpose of the Content-Lo

4条回答
  •  旧巷少年郎
    2020-12-08 05:02

    Section 14.14 of RFC 2616 states:

    The Content-Location entity-header field MAY be used to supply the resource location for the entity enclosed in the message when that entity is accessible from a location separate from the requested resource's URI...

    This is used in AtomPub (RFC 5023, Section 9.2):

    If the creation request contained an Atom Entry Document, and the subsequent response from the server contains a Content-Location header that matches the Location header character-for-character, then the client is authorized to interpret the response entity as being a complete representation of the newly created Entry. Without a matching Content-Location header, the client MUST NOT assume the returned entity is a complete representation of the created Resource.

提交回复
热议问题