• Harris Hancock's avatar
    Zero-length HTTP responses to HEAD get no Content-Length header · 48083d47
    Harris Hancock authored
    There is currently no way to explicitly omit a Content-Length/Transfer-Encoding header on an HTTP response to a HEAD request. This is awkward for a proxy, which would ideally pass along responses as-is, even if they have no such headers.
    
    This change allows an author to pass zero as the expected body length to HttpService::Response::send() to mean "do not set any body header." This means that a proxy might strip Content-Length: 0 headers, but will never add a Content-Length header where there was none before.
    48083d47
http-test.c++ 102 KB