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

Connection reset by peer error on URL's with parameters #12

Closed
viccherubini opened this issue Nov 10, 2012 · 0 comments
Closed

Connection reset by peer error on URL's with parameters #12

viccherubini opened this issue Nov 10, 2012 · 0 comments

Comments

@viccherubini
Copy link

When using HTTPretty with URL with parameters, the connection will eventually die and return with an error that says:

ConnectionError: [Errno 54] Connection reset by peer

Note: this is when using the Requests library. However, if the URL does not have any parameters, then HTTPretty works fine.

# Fails
HTTPretty.register_uri(HTTPretty.GET, 'http://example.com/index.php?id=10', body='example response', status=200)
r = requests.get('http://example.com/index.php?id=10')

# Works
HTTPretty.register_uri(HTTPretty.GET, 'http://example.com/index.php', body='example response', status=200)
r = requests.get('http://example.com/index.php')

I wish I knew enough Python to offer a pull request. Anyway, it's a great library, but this one bug is preventing me from using it. Thank you!

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

2 participants