Repository navigation
Conversation
|
rfc 1945 - HTTP 1.0 section 8.2 and (the obsolete) rfc 2616 - HTTP 1.1 state
i.e. A HEAD request should include a Content-Length header. Whereas rfc 7231 - HTTP 1.1 section 4.3.2 allows Content-Length header to be missing. After #1139 was merged, the remaining logic in the AutoPage handler this Pr is optimising does need some cleaning up. However, I think we should always render the content and let our middleware stack remove the body for a HEAD request, so the Content-Length header is included in the response. |
|
and .. @racke++ for picking up that the logic needs cleaning up there! |
|
I think we should benchmark not using the Head middleware. If we're already at the spot where we have the body and headers and we can just remove the body, that will save at least two subroutine calls per request for a single (Some of the optimizations I did in D2 to make it faster than D1 was removing unnecessary middlewares - it made a big difference.) |
|
So, so summarize:
Should we close this issue? |
|
Done - #1170. |
|
Doing some housekeeping... looking at this PR, the ensuing discussion, and #1170, is it ok to close this? I am inclined to. Thanks! |
|
@cromedome agree: time to close this one. |
|
Thanks! |
Tiny optimization for autopage handler - it doesn't make sense to render the template and throw it away.