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

Python3: Use http.client.HTTPMessage.raw_items() to get header fields #26391

Merged
merged 2 commits into from Nov 24, 2020

Conversation

ziransun
Copy link
Member

@ziransun ziransun commented Nov 4, 2020

This probably is more direct than using .as_string().

This probably is more direct than using .as_string().
xhr/resources/inspect-headers.py Outdated Show resolved Hide resolved
xhr/resources/inspect-headers.py Outdated Show resolved Hide resolved
xhr/resources/inspect-headers.py Outdated Show resolved Hide resolved
@ziransun ziransun changed the title Python3: Use http.client.HTTPMessage.items() to get header fields Python3: Use http.client.HTTPMessage.raw_items() to get header fields Nov 5, 2020
Copy link
Member

@Hexcles Hexcles left a comment

Choose a reason for hiding this comment

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

I believe this is better (more "raw" / direct), so LGTM.

But I agree that this is still not perfect as we still don't have full control over the parsing (Python 3 at the very least splits by lines and colons for us, which is worse than Python 2 which only splits lines).

@Hexcles Hexcles merged commit 0521652 into web-platform-tests:master Nov 24, 2020
@ziransun ziransun deleted the xhr-mail branch November 30, 2020 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants