You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andriy Redko (Jira)" <ji...@apache.org> on 2021/08/02 22:28:00 UTC
[jira] [Assigned] (CXF-8572) Incorrectly parsed ETag when contains
'W/' as part of the content
[ https://issues.apache.org/jira/browse/CXF-8572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andriy Redko reassigned CXF-8572:
---------------------------------
Assignee: Andriy Redko
> Incorrectly parsed ETag when contains 'W/' as part of the content
> -----------------------------------------------------------------
>
> Key: CXF-8572
> URL: https://issues.apache.org/jira/browse/CXF-8572
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Environment: Servlet filter in Websphere Liberty 20.0.0.3 with JAX-RS.
> Reporter: Ben Cox
> Assignee: Andriy Redko
> Priority: Minor
>
> We have the following ETag being generated:
> {noformat}
> wyoBLW/ye71RgN/0LNyj4eA5rfE1ovtlM03aakuGr2Y=
> {noformat}
> You'll note in characters 6-7, the combination {{W/}} is found.
> When we run {{EntityTag.valueOf(etag)}} using this Etag, this results in the following error:
> {noformat}
> java.lang.IllegalArgumentException: Misformatted ETag : "wyoBLW/ye71RgN/0LNyj4eA5rfE1ovtlM03aakuGr2Y="
> at org.apache.cxf.jaxrs.impl.EntityTagHeaderProvider.fromString(EntityTagHeaderProvider.java:57)
> {noformat}
> The problem [in the code|https://github.com/apache/cxf/blob/097e6bf31f3341ec3fc0a08cfd1f6b65a5e97b1e/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/EntityTagHeaderProvider.java#L42] seems to be that it accepts {{W/}} as a special combination regardless of position, which doesn't match with the spec as I read it.
> Setting this minor because in our case I can change a little bit of documentation and alter the ETag; however, it could be a larger problem for anyone who is dealing with purely computer-generated tags and can't get away from a tag with {{W/}} in it.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)