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

Fix for issue #432. Read the response from httplib even if there is a 0 ... #496

Merged
merged 2 commits into from
Mar 16, 2015

Conversation

fviard
Copy link
Contributor

@fviard fviard commented Mar 12, 2015

...byte to read. So httplib doesn't think that there is a response waiting to be read when the next request come.

Straightforward to fix thanks to the detailed analysis of Edwintorok.

<<
This seems to be due to this in python 2.7.9rc1's httplib:

    if self.__state != _CS_REQ_SENT or self.__response:
        raise ResponseNotReady()

Apparently python created a response object for the content-length: 0 reply (for GET /0) and s3cmd
didn't read/close that response object, and now it gives an error when you try to read anything else on the same persistent connection.

#432

fviard added 2 commits March 12, 2015 19:22
…re is a 0 byte to read. So httplib doesn't think that there is a response waiting to be read when the next request come.

Straightforward to fix thanks to the detailed analysis of Edwintorok.

<<
This seems to be due to this in python 2.7.9rc1's httplib:

        if self.__state != _CS_REQ_SENT or self.__response:
            raise ResponseNotReady()

Apparently python created a response object for the content-length: 0 reply (for GET /0) and s3cmd
didn't read/close that response object, and now it gives an error when you try to read anything else on the same persistent connection.
>>
…rror expect an http response, not a text message)
mdomsch added a commit that referenced this pull request Mar 16, 2015
Fix for issue #432. Read the response from httplib even if there is a 0 ...
@mdomsch mdomsch merged commit 8027377 into s3tools:master Mar 16, 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.

2 participants