PaxWeb internal ResourceServlet generates invalid ETag

Description

I am using Karaf 4.2.9 with Spring 5.2 and PaxWeb 7.2.16

After upgrading my application, I noticed that some resources are not cached anymore. It's due to a combinaison of :

  • Jetty GZipHandler

  • Spring ShallowETagHeaderFilter

  • HTTP Whiteboard resources

Before the upgrade, ShalowETagHeaderFilter (in spring 5.1) was always recalculing the etag of the resources. the etag generated by the ResourceServlet was not exposed

After the upgrade, this filter doesn't do anything if the underlying servlet generates an etag. However, the Etag generated by the ResourceServlet is not valid. An etag, per RFC, should be quoted by a double apostrophe and this servlet doesn't add quotes. Because the ETag is invalid, the logic in the GZipHandler about Etag is not correctly executed, and the resource is not cached.

Environment

Karaf 4.2.9

Activity

Show:
Jean-Baptiste Onofre
September 14, 2020, 2:59 PM

about the patch you attached, are you suspecting this change cause the problem ?

Jérémie Brébec
September 14, 2020, 4:48 PM

Sorry, I have attached the wrong patch..

Jean-Baptiste Onofre
September 14, 2020, 4:55 PM

Oh, thanks ! No problem I’m reviewing and applying (I’m investigating another issue related to Jetty update).

Assignee

Jean-Baptiste Onofre

Reporter

Jérémie Brébec

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure