Skip to content
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

🩹 Trim one optional leading space from headers #405

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

RafaelKr
Copy link
Contributor

@RafaelKr RafaelKr commented Oct 3, 2024

In my last PR #402 @QWp6t removed the ltrim. This leads to one added leading space to every header value. See #404 (comment)

This PR can handle the case X-Header:Value which #402 already fixed without adding or removing leading whitespace in other cases.

Examples:

'X-Header:Value' => ['X-Header', 'Value']
'X-Header: Value' => ['X-Header', 'Value']
'X-Header:  Value' => ['X-Header', ' Value']
'X-Header:   Value' => ['X-Header', '  Value']

Examples:
```
'X-Header:Value' => ['X-Header', 'Value']
'X-Header: Value' => ['X-Header', 'Value']
'X-Header:  Value' => ['X-Header', ' Value']
'X-Header:   Value' => ['X-Header', '  Value']
```
@QWp6t
Copy link
Member

QWp6t commented Oct 3, 2024

I appreciate your persistence and thanks for clarifying the issue. 🙏

@QWp6t QWp6t merged commit b72fd72 into roots:main Oct 3, 2024
1 check passed
@RafaelKr RafaelKr deleted the fix/header-splitting branch November 7, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants