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

Switch http libraries used in checks to requests #1399

Merged
merged 1 commit into from
Feb 27, 2015
Merged

Switch http libraries used in checks to requests #1399

merged 1 commit into from
Feb 27, 2015

Conversation

remh
Copy link
Contributor

@remh remh commented Feb 26, 2015

@remh remh added this to the 5.3.0 milestone Feb 26, 2015
v = headers['server']
try:
version = int(v.split('/')[1][0])
except Exception, e:
Copy link
Member

Choose a reason for hiding this comment

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

or

version = int(headers.get('server').split('/')[1][0])

None will raise an exception and you get Unknown too?

Copy link
Member

Choose a reason for hiding this comment

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

or better 🏭 match this against a regex? 🌟

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@LeoCavaille
Copy link
Member

Thanks for doing this refactoring, this is awesome.
Barely anything to say, it looks good from what I have seen, maybe I'd be even more confident if we had tests for all these checks, but eh we'll see that in the near future.
🎆 😻 🔨

* Fix #1196
* Fix #1398

Along with the self contained agent (pyopenssl etc) it will support SNI.

See https://github.com/kennethreitz/requests/issues/749 for more information
remh added a commit that referenced this pull request Feb 27, 2015
Switch http libraries used in checks to requests
@remh remh merged commit 8b69575 into master Feb 27, 2015
@LeoCavaille
Copy link
Member

BIM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants