I made this change because once the method is HEAD it doesn't matter what the resp_state is - we just need to return ok.  Alternately we could add multiple cases (resp_state=chunks, resp_state=streamed…) but that is more brittle and (for me at least) shows the intent less well.

I've changed (removed!) the documentation and am fighting with tab etc (very different defaults on our editors!)  Should have a new push in the next hour or so  

--  
Dr Adrian Roe
Director


On Saturday, 29 June 2013 at 18:46, Loïc Hoguin wrote:

> In src/cowboy_req.erl:
> > _ = reply(Status, [], [], Req), > ok; > %% Terminate the chunked body for HTTP/1.1 only. > -ensure_response(#http_req{method= <<"HEAD">>, resp_state=chunks}, _) -> > - ok; > -ensure_response(#http_req{version='HTTP/1.0', resp_state=chunks}, _) ->  
> I don't understand why you changed this.
>  
> —
> Reply to this email directly or view it on GitHub (https://github.com/extend/cowboy/pull/548/files#r4952582).
>  
>  
>