Fork me on GitHub
#immutant
<
2017-05-02
>
tcrawley14:05:15

@dergutemoritz according to https://tools.ietf.org/html/rfc7230#section-3.3.1, Transfer-Encoding isn't required for HEAD requests, and I suspect undertow will strip it out if you set it manually, since there is no body

tcrawley14:05:20

@bostonaholic If you need access to the request map, you'll need to use immutant.web.async/as-channel from a ring handler instead of wrap-websocket (that's what wrap-websocket is doing for you under the hood

tcrawley14:05:41

and I would think that wss would just work if you have ssl set up

dergutemoritz14:05:09

@tcrawley Indeed - however, Immutant adds a Content-Length: 0 header otherwise which contradicts this paragraph in https://tools.ietf.org/html/rfc7230#section-3.3.2 > A server MAY send a Content-Length header field in a response to a HEAD request (Section 4.3.2 of [RFC7231]); a server MUST NOT send Content-Length in such a response unless its field-value equals the decimal number of octets that would have been sent in the payload body of a response if the same request had used the GET method.

dergutemoritz14:05:39

(my actual payload is > 0 bytes long, of course)

tcrawley14:05:50

I can see if that's Immutant or undertow doing that underneath

dergutemoritz14:05:59

In my case, I can't predict the payload size so I'd like to leave it off entirely

dergutemoritz14:05:08

That'd be nice!

bostonaholic16:05:10

thanks @tcrawley I’ll take a look at using as-channel