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

♻️ Standardize the content-type header by using an enum value over typing it manually #474

Conversation

loikx
Copy link
Contributor

@loikx loikx commented Dec 31, 2023

What does this PR do?

Refactoring the code to use the actix-web crate provided content-type headers for this in the router.rs file located in the src/server. Also, in the search.rs file

Why is this change important?

This change is essential as it standardizes content-type headers instead of typing them manually, which can be prone to errors like unintentional addition of white spaces, etc.

Author's checklist

  • Settings function has another input parameters (safe_search_level and engine_names: &HashMap<String, bool>). So code in issue will not compile without changes in settings function.

Related issues

Closes #466

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first Pull Request and thanks for taking the time to improve Websurfx! ❤️!
Say hello by joining the conversation in our Discord

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.

Thanks ❤️ for such a wonderful PR. We really appreciate it 👍 Keep it up!! But we would like to suggest one minor change before we merge this PR in. 🙂

src/server/router.rs Outdated Show resolved Hide resolved
neon-mmd
neon-mmd previously approved these changes Dec 31, 2023
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.

Thanks ❤️ again for working on this PR. Since everything looks good. We will merge this PR right away 🚀 🙂 .

neon-mmd

This comment was marked as duplicate.

@neon-mmd neon-mmd merged commit 5020f36 into neon-mmd:rolling Dec 31, 2023
5 checks passed
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.

♻️ Standardize the content-type header by using an enum value over typing it manually
2 participants