-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Unable to parse "If-None-Match" header value #2511
Comments
Reported by lucianb |
michalgajdos said: Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the ETag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. The definition of how they are used and compared as cache validators is in section 13.3.3. An entity tag consists of an opaque quoted string, possibly prefixed by a weakness indicator.
A "strong entity tag" MAY be shared by two entities of a resource only if they are equivalent by octet equality. A "weak entity tag," indicated by the "W/" prefix, MAY be shared by two entities of a resource only if the entities are equivalent and could be substituted for each other with no significant change in semantics. A weak entity tag can only be used for weak comparison. An entity tag MUST be unique across all versions of all entities associated with a particular resource. A given entity tag value MAY be used for entities obtained by requests on different URIs. The use of the same entity tag value in conjunction with entities obtained by requests on different URIs does not imply the equivalence of those entities. [1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.11 |
michalgajdos said: |
runarb said:
and a ResponseBuilder of 400 should be returned. It feels wrong having to deal with this exception when "trusting" evaluateIfNoneMatch(..) to take care of handling the entity tag. What do you think? |
avsokolov said:
I run tests via arquillian, dependency versions:
How can I resolve it? How can I send a request with "If-None-Match" header inlcuded and don't get an exception? |
This issue was imported from java.net JIRA JERSEY-2239 |
If If-None-Match Header Etag content is sent without the quotes like c27b74582676d4cca1e35d3fd2171d5b , the request fail
If the content is sent with quotes like "c27b74582676d4cca1e35d3fd2171d5b" everything goes well.
The exception thrown:
Environment
Windows 7 Ultimate Service Pack 1 64bit
Affected Versions
[2.4.1]
The text was updated successfully, but these errors were encountered: