Skip to content

lambda_http 0.11.3 breaks response headers #876

@jantb

Description

@jantb

I'm getting no response headers when using the latest version of lambda http,

I am using this config in cargo.toml
lambda_http = { version = "=0.11.3",default-features = false, features = ["apigw_http"] }

0.11.1 does not have this issue:

Here is how I set the response in the handler

   Ok(Response::builder()
        .status(200)
        .header("content-type", "text/html")
        .body("something".into())
        .map_err(Box::new)?)

curl -v shows this as the headers with version 0.11.1

< HTTP/2 200 
< date: Wed, 15 May 2024 13:48:35 GMT
< content-type: text/html
< content-length: 553
< apigw-requestid: ...

and for 0.11.3:

< HTTP/2 200 
< date: Wed, 15 May 2024 13:52:58 GMT
< content-type: text/plain; charset=utf-8
< content-length: 553
< apigw-requestid: ...

This seems related to this commit
fc49dd5
which is the only one in 0.11.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions