Skip to content

How to disable header name downcasing in request header #454

@josv

Description

@josv

Hi,

Using req 0.5.8, to my great satisfaction.

However I have one issue with a non-compliant server that insists on receiving the header "Cookie" (case sensitive). I can not change this server, so I wondered how I can make req generate the request with the header name not downcased?

I tried:

   req =
      Req.new(url: url, connect_options: [transport_opts: [verify: :verify_none]])

    #  |> Req.Request.put_header("Cookie", "mysession=#{session_id}")
    req = put_in(req.headers["Cookie"], List.wrap("mysession=#{session_id}"))
    Req.get(req)

But that didn't help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions