Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Omitting Content-Length header on response to HEAD

Seeing as HEAD requests, per the various RFCs, are essentially GET requests with complete and valid response headers, but never any content, having a HEAD response with Content-Length is 100% valid and appropriate.

Is the particular resource you are working with not valid for a GET request?


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

On Tue, Nov 11, 2014 at 6:58 PM, James Reeves <jreeves@xxxxxxxxxxxxxxx> wrote:
Hi folks,

I'd like to omit the Content-Length header in a response to a HEAD request, but I can't for the life of me work out how to do this. No matter what I do the Content-Length header is always emitted.

I'm using an embedded Jetty 7.6.13. A little old, I know, but there's a minimum dependency on Java 1.5 I can't yet work around.

Does anyone have any ideas on how to accomplish this, in Jetty 7 or indeed any other version?

- James

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top