Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP: max length of etag

Tags:

Does the HTTP protocol specify a max length for the ETag?

like image 314
flybywire Avatar asked Nov 16 '09 08:11

flybywire


People also ask

What is ETag in HTTP response?

The ETag (or entity tag) HTTP response header is an identifier for a specific version of a resource. It lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content was not changed.

What is ETag standard?

An entity tag (ETag) is an HTTP header used for Web cache validation and conditional requests from browsers for resources. Etags use persistent identification elements (PIE) that have been tagged to the user's browser.

What is ETag in REST API?

An entity tag, or ETag, is a mechanism that is provided by the HTTP protocol so that a browser client or a script can make conditional REST requests for optimistic updating or optimized retrieval of entities.

What is ETag in Wireshark?

An ETag is an opaque identifier assigned by a Web server to a specific version of a resource found at a URL.


2 Answers

No.

14.19 ETag

The ETag response-header field provides the current value of the entity tag for the requested variant. The headers used with entity tags are described in sections 14.24, 14.26 and 14.44. The entity tag MAY be used for comparison with other entities from the same resource (see section 13.3.3).

    ETag = "ETag" ":" entity-tag

Examples:

    ETag: "xyzzy"
    ETag: W/"xyzzy"
    ETag: ""
like image 61
Joey Avatar answered Sep 17 '22 17:09

Joey


No, an entity-tag is a quoted-string with an optional weak indicator prefix and can be of any length in theory.

In practice, the length of a header field is limited, both by user agents and web servers. The maximum viable length of the entire header field should be somewhere at 8 KiB.

like image 38
Gumbo Avatar answered Sep 18 '22 17:09

Gumbo