Skip to content

Keep-Alive ignored for HTTP(S) HEAD requests #12396

@Limess

Description

@Limess

Version: v.4.8.0, v7.9.0
Platform: OSX 10.10.5 (Darwin MC-S103314.local 14.5.0 Darwin Kernel Version 14.5.0: Sun Sep 25 22:07:15 PDT 2016; root:xnu-2782.50.9~1/RELEASE_X86_64 x86_64)
Subsystem: http / net

http(s) HEAD requests don't obey Keep-Alive, even when Connection: Keep-Alive is set.
The same http(s) GET request obeys Keep-Alive.

I believe I've followed this down to:

  1. parser->flags & F_SKIPBODY) { /* response to a HEAD request */
    which is called from
  2. return !http_message_needs_eof(parser);
    this propagates back to
  3. function parserOnHeadersComplete(versionMajor, versionMinor, headers, method,
    with shouldKeepAlive set to false, regardless of a Connection: Keep-Alive header.

I've been unable to find anything in any linked RFC from the above code block to support this being per-specification, if it is I'd appreciate someone highlighting it to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    httpIssues or PRs related to the http subsystem.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions