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

Invalid Header stops processing Body? #659

Closed
AlJohri opened this issue Dec 5, 2015 · 3 comments
Closed

Invalid Header stops processing Body? #659

AlJohri opened this issue Dec 5, 2015 · 3 comments
Labels

Comments

@AlJohri
Copy link

AlJohri commented Dec 5, 2015

Hi,

I'm not sure if this is intended behavior but I was scraping an rss feed which has a malformed header yet the body is still okay. Chrome seems to render the content fine. This is what the headers look like:

➜  ~  curl -I http://www.epw.in/feed/commentary.xml
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 05 Dec 2015 08:20:16 GMT
Content-Type: application/rss+xml; charset=utf-8
Connection: keep-alive
Keep-Alive: timeout=300
Set-Cookie: url_info=/feed/commentary.xml; path=/
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Sat, 05 Dec 2015 08:20:15 GMT
Cache-Control: store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
"X-XSS-Protection: 0"

The X-XSS-Protection header is the culprit yielding a:
InvalidHeader('400, message=\'Invalid HTTP Header: "X-XSS-PROTECTION\'',)

Would it make sense to continue processing and get the body?

@asvetlov
Copy link
Member

asvetlov commented Dec 5, 2015

Processing malformed headers is cumbersome procedure, many workarounds are required.
We don't try to fix protocol errors.

@AlJohri
Copy link
Author

AlJohri commented Dec 5, 2015

Fair enough!

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants