Skip to content

Response without a body receives Transfer-Encoding: chunked #1257

@slyrz

Description

@slyrz

I want a server to make a 304 Not Modified response like this:

Response::new()
         .with_status(StatusCode::NotModified)
         .with_header(ETag(etag))
         .with_header(LastModified(last_modified))

My problem is hyper sees the response without body (or without Content-Length) and adds a Transfer-Encoding: chunked to the headers (here's the culprit).

Am I using the API wrong or is this an error on hyper's side?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug. Something is wrong. This is bad!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions