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

Fixed frozen request when content-length equals 0 #1520

Merged
merged 1 commit into from Jun 24, 2015

Conversation

ar4s
Copy link
Contributor

@ar4s ar4s commented Jun 23, 2015

Prevent freezing request in get_http_info.

@ghost
Copy link

ghost commented Jun 24, 2015

🆗

response.raise_for_status()
headers, content = response.headers, response.content
except requests.exceptions.RequestException as e:
logger.error("Exception: {} for url: {}".format(e, url))
session.close()
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this be in some finally block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe better than finally block will be with statement around whole try..execpt blocks?

Prevent freezing request in ``get_http_info``.
@mkurek
Copy link
Contributor

mkurek commented Jun 24, 2015

🆗

ar4s added a commit that referenced this pull request Jun 24, 2015
Fixed frozen request when content-length equals 0
@ar4s ar4s merged commit 9cc4698 into allegro:develop Jun 24, 2015
@ar4s ar4s removed the in progress label Jun 24, 2015
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

Successfully merging this pull request may close these issues.

None yet

2 participants