Skip to content

HTTP/1.0 and keep-alive bug #1614

Closed
@miquels

Description

@miquels

I was testing my hyper-based server with ab (Apache Bench) and it turns out that if you enable the -k (keepalive) option, ab just hangs.

Turns out that ab uses HTTP/1.0 requests. It sends a Connection: keep-alive header, and hyper does keep the connection alive, but it does not add a Connection: keep-alive header to the reply. ab assumes that the server does not support keep-alive, and waits for the server to close the connection, and as a result ab hangs.

Hyper should probably add a Connection: keep-alive header to the response if it is found in the request, the request protocol is HTTP/1.0 and there's no Connection header in the Response object present yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-http1Area: HTTP/1 specific.C-bugCategory: bug. Something is wrong. This is bad!E-easyEffort: easy. A task that would be a great starting point for a new contributor.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions