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

🎨 Change http header word/sentence casing #555

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

tatodorov
Copy link
Contributor

@tatodorov tatodorov commented Apr 20, 2024

What does this PR do?

The PR fixes the casing of the HTTP request headers sent to the search engines.

Why is this change important?

Currently all HTTP request headers are in snake case and upper case.
The adopted standard is kebab case and title case.

Here you will find more details 👉 Standard request fields

Although using title case is optional, the usage of snake case for phrases is a must.

How to test this PR locally?

You can temporarily add println!("{:#?}, header_map); after each initialization of the HeaderMap.
Then just execute cargo run and make a search.

Currently all HTTP request headers are in snake case and upper case.
The adopted standard is kebab case and title case.

Here you will find more details:
https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Standard_request_fields
@tatodorov tatodorov changed the title Fix HTTP header's casing Fix HTTP headers' casing Apr 22, 2024
@neon-mmd neon-mmd changed the title Fix HTTP headers' casing 🎨 Change http header word/sentence casing Apr 24, 2024
Copy link
Owner

@neon-mmd neon-mmd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review.

Thanks ❤️ for working on this PR. We really appreciate it 👍 Good job!! Keep it up!! Since everything looks good. We will merge this PR as soon as possible 🙂 .

@neon-mmd neon-mmd merged commit 93fd8f8 into neon-mmd:rolling Apr 25, 2024
5 checks passed
@tatodorov tatodorov deleted the fix-headers branch April 25, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants