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

enhancement: add a single space after colon in headers in Response class #6976

Merged

Conversation

rasteiner
Copy link
Contributor

@rasteiner rasteiner commented Feb 6, 2025

Description

This PR adds a single space after the : in header responses for better server support.

Summary of changes

Add a single space after colon in headers in Response class.

Before:

Content-Type:foo/bar

After:

Content-Type: foo/bar

Reasoning

That single space was expected in HTTP/1.0.
While since HTTP/1.1 it's optional, some products still seem to rely on it being present. So, adding it broadens the support for servers (and really old browsers I guess).

Additional context

HTTP/1.0: https://datatracker.ietf.org/doc/html/rfc1945#section-4.2
HTTP/1.1: https://datatracker.ietf.org/doc/html/rfc2616#section-4.2

Changelog

Fixes

Ready?

  • In-code documentation (wherever needed)
  • Unit tests for fixed bug/feature
  • Tests and CI checks all pass

For review team

  • Add lab and/or sandbox examples (wherever helpful)
  • Add changes & docs to release notes draft in Notion

@bastianallgeier bastianallgeier added this to the 4.6.1 milestone Feb 6, 2025
@bastianallgeier bastianallgeier merged commit a740272 into getkirby:develop-patch Feb 6, 2025
8 checks passed
@rasteiner rasteiner deleted the fix/malformed-header branch February 6, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants