Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpClient] Preserve the case of headers when sending them#32823

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:4.3fromnicolas-grekas:hc-ucwords
Jul 31, 2019

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekasnicolas-grekas commentedJul 30, 2019
edited
Loading

QA
Branch?4.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#32819
LicenseMIT
Doc PR-

Some hosts are case sensitive, let's present headers in the submitted form.

@fabpot
Copy link
Member

What aboutETag?

@javiereguiluz
Copy link
Member

@nicolas-grekas as you said here#32819 (comment)

  • In HTTP 1, headers should be lowercase(but some APIs don't respect that)
  • In HTTP/2, headers can only be lowercase

So, could we leave headers as-is when using HTTP 1 (no strtolower, no ucwords, no changes whatsoever) and just applystrtolower() unconditionally when using HTTP/2? Thanks.

@nicolas-grekas
Copy link
MemberAuthor

Got it, see also comments on the linked issue.

@nicolas-grekas
Copy link
MemberAuthor

So, could we leave headers as-is when using HTTP 1 (no strtolower, no ucwords, no changes whatsoever) and just apply strtolower() unconditionally when using HTTP/2? Thanks.

That is not possible, because the protocol can be decided automatically.
The only sensible way is to preserve the input case.
That will break normalization, but since this is internal concern, there should be ways around.

javiereguiluz reacted with thumbs up emoji

@nicolas-grekasnicolas-grekas changed the title[HttpClient] use ucwords() on header names before sending them[HttpClient] Preserve the case of headers when sending themJul 31, 2019
@nicolas-grekas
Copy link
MemberAuthor

PR updated, ready.

numerogeek reacted with thumbs up emoji

@nicolas-grekasnicolas-grekas merged commit9ac85d5 intosymfony:4.3Jul 31, 2019
nicolas-grekas added a commit that referenced this pull requestJul 31, 2019
…m (nicolas-grekas)This PR was merged into the 4.3 branch.Discussion----------[HttpClient] Preserve the case of headers when sending them| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#32819| License       | MIT| Doc PR        | -Some hosts are case sensitive, let's present headers in the submitted form.Commits-------9ac85d5 [HttpClient] Preserve the case of headers when sending them
@nicolas-grekasnicolas-grekas deleted the hc-ucwords branchJuly 31, 2019 15:52
@fabpotfabpot mentioned this pull requestAug 26, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

4 participants

@nicolas-grekas@fabpot@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp