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

[BUG] follow_redirects doesn't work with Python 3 #9

Open
qfayet opened this issue Oct 7, 2021 · 0 comments
Open

[BUG] follow_redirects doesn't work with Python 3 #9

qfayet opened this issue Oct 7, 2021 · 0 comments

Comments

@qfayet
Copy link

qfayet commented Oct 7, 2021

For example, results are not the same for http://google.com/ between version 2 and 3 of Python.

python securityheaders.py http://google.com/

Because with Python 3, the code doesn't follow redirections.

The error is located line 233 of securityheaders/securityheader.py.

The line:

                    if (header[0] == 'location'):

must be changed in:

                    if (header[0].lower() == 'location'):

Because, in version 3 of Python, header are not in lower case.

Pull request: #10.

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

No branches or pull requests

1 participant