cdent / wsgi-intercept

Intercept socket connection to wsgi applications for testing
MIT License
42 stars 21 forks source link

Guard against http_proxy and https_proxy #35

Closed cdent closed 8 years ago

cdent commented 8 years ago

requests and urllib will get upset of socks proxy settings are present in the environment. In those interceptors, an exception will now be raised if $http_proxy or $https_proxy are set.

Tests are added to cover the variable being set for all four of the interceptor types.

This is the quick and dirty solution to the problem. The way this has been done shows some clear opportunities for refactoring down the road.

Fixes #30

cdent commented 8 years ago

I sanity checked this on @FND so gonna merge it, do some other mild cleanups and do a new release.