8000 HttpClient panel in the Web Profiler not displaying all request headers · Issue #43348 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

HttpClient panel in the Web Profiler not displaying all request headers #43348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ankahla opened this issue Oct 6, 2021 · 3 comments
Closed

Comments

@ankahla
Copy link
ankahla commented Oct 6, 2021

Symfony version(s) affected: 5.3.2

Description
As menstionned here #33311 (comment) guzzle output the request headers (including default headers in configuration).
Unfortunatly even with this PR #35407 we still not collecting all headers : headers defined in configuration are missing!

How to reproduce

#config/packages/framework.yaml
http_client:
        default_options:
            headers:
                Accept: application/json
                User-Agent: "app_web"
        scoped_clients:
            http.client.api:
                base_uri: '%api_uri%'
                headers:
                    CustomHeader: "%api_host%"

Possible Solution
Exposing $defaultHeaders attribute and get it from HttpClientTrait directly as an attribute.

Additional context
image

@nicolas-grekas
Copy link
Member

I just had a look and proposed #43569, which fixes collecting the "debug" info when curl is used and no method is called on response o 8000 bjects.
This does not fix what you describe, but I don't think we can nor should do that.
If you want to know which headers have been sent on the wire, look at this "debug" info instead.

@stof
Copy link
Member
stof commented Oct 18, 2021

@nicolas-grekas should the profiler display the debug info ?

fabpot added a commit that referenced this issue Oct 18, 2021
…urlResponse (nicolas-grekas)

This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix collecting debug info on destruction of CurlResponse

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #43348
| License       | MIT
| Doc PR        | -

Commits
-------

f0b52c8 [HttpClient] fix collecting debug info on destruction of CurlResponse
@nicolas-grekas
Copy link
Member

it does, under "info"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0