Skip to content

[HttpClient] Headers are lowercased #32819

@numerogeek

Description

@numerogeek

Hello guys !

I'm submitting you the following issue:

Symfony version(s) affected: 4.3.x

Description
When I set some headers to a curl POST request, the keys are lowercased. This is a problem for some API's

        $this->httpClient = HttpClient::create(['headers' => [
            'X-Apple-Header1' => 'someSecretKey',
            'X-Apple-Header2' => 'someSecretKey',
            'X-Apple-Header3' => 'someSecretKey',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ]]);

And it's converted by HttpClient to :

POST /api/endpoint/1 HTTP/1.1
   Host: api.apple.com
   Accept-Encoding: deflate, gzip
   x-apple-header1: someSecretKey
   x-apple-header2: someSecretKey
   x-apple-header3: someSecretKey

Additional context
I'm using the Curl extension

thanks for helping !

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy