Skip to content

Don't discard HEAD. Fixes #148#180

Open
cddr wants to merge 1 commit into
clojure-liberator:masterfrom
cddr:no-discard-head
Open

Don't discard HEAD. Fixes #148#180
cddr wants to merge 1 commit into
clojure-liberator:masterfrom
cddr:no-discard-head

Conversation

@cddr

@cddr cddr commented Oct 15, 2014

Copy link
Copy Markdown
Contributor

I suppose another way of fixing this would be to compute the length as if for a GET and use that for the "Content-Length" but considering there might be middleware somewhere that alters it (e.g. gzip), it seems easier to just pass along the body and allow it to be dealt with at the edge.

@ordnungswidrig

Copy link
Copy Markdown
Member

That's a good point. I'm not sure how middleware / jetty / content-encoding play together. I need to investigate further and study the RFC and jetty-adapter.

@jeluard

jeluard commented Nov 6, 2014

Copy link
Copy Markdown
Contributor

According to latest RFC 7231 the server MUST NOT send a message body in the response and the payload header fields MAY be omitted, Content-Length being one of those.

It sounds like liberator is doing the right thing but downstreams adapters incorrectly add the header. Maybe something to investigate with ring?

@ordnungswidrig

Copy link
Copy Markdown
Member

Until #148 is clear, I will mark this as wont fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants