Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Last-Modified header is no longer added to response in ResourceHandler in 9.0.5

Not sure why, but it was removed as part of this commit.

Commit ID: 9f3e4dc5b7677c290e090db7e036d50bfa2b1870
398467 Servlet 3.1 Non Blocking IO

That line removal seems dubious. Will investigate why it was removed, and why we apparently have no test case for that (out of the 3,000+ test cases we have now)

Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts

On Mon, Sep 2, 2013 at 6:32 AM, Озеров Владимир <ppozerov@xxxxxxx> wrote:

Our application use Jetty to handle resource requests with ResourceHandler. And we rely on "Last-Modified" header for some internal purposes on client side. Earlier we used Jetty 9.0.3 and everything was fine: "Last-Modified" was always attached to the response.
However, when we migrated to 9.0.5 due to another Jetty bug ( we noticed that out client no longer works. Investigation revealed that "Last-Modified" header are no longer attached to resource response and there is no way to override that.

This is 9.0.3.v20130506 code snippet from ResourceHandler.handle() method:

433    doResponseHeaders(response,resource,mime!=null?mime.toString():null);
434    response.setDateHeader(HttpHeader.LAST_MODIFIED.asString(),last_modified);
435    if (_etags)
436        baseRequest.getResponse().getHttpFields().put(HttpHeader.ETAG,etag);

And this is from 9.0.5.v20130815:

487    doResponseHeaders(response,resource,mime!=null?mime.toString():null);
488    if (_etags)
489        baseRequest.getResponse().getHttpFields().put(HttpHeader.ETAG,etag);

 As you can see, the string adding "Last Modified" header was simply removed. 

The qusetion is: was it done intentionally or is it a bug?


jetty-users mailing list

Back to the top