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

Made Content-Type check whitespace agnostic in LoadURL() #42

Merged
merged 1 commit into from
Aug 6, 2020

Conversation

aliras1
Copy link
Contributor

@aliras1 aliras1 commented Jun 8, 2020

When loading properties from URLs, if a web server defined its Content-Type without any whitespaces between the text type and charset, the load fails with an invalid content type error. E.g.
text/plain;charset=utf-8 instead of
text/plain; charset=utf-8.

This PR makes the Content-Type check whitespace agnostic by removing all whitespace characters from the header field and comparing it to the appropriate strings.

@aliras1
Copy link
Contributor Author

aliras1 commented Jun 15, 2020

@magiconair, any thoughts on this PR?

Copy link
Owner

@magiconair magiconair left a comment

Choose a reason for hiding this comment

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

Thank you!

@magiconair magiconair merged commit ff39abe into magiconair:master Aug 6, 2020
@magiconair magiconair added this to the 1.8.2 milestone Feb 23, 2022
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.

None yet

2 participants