libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (LIBCLOUD-901) 4xx and 5xx HTTP status codes are silently masked as 200
Date Sat, 01 Apr 2017 02:49:41 GMT


ASF GitHub Bot commented on LIBCLOUD-901:

Github user asfgit closed the pull request at:

> 4xx and 5xx HTTP status codes are silently masked as 200
> --------------------------------------------------------
>                 Key: LIBCLOUD-901
>                 URL:
>             Project: Libcloud
>          Issue Type: Bug
>            Reporter: Richard Xia
> I'm seeing this on the latest trunk as well as v2.0.0rc1-tentative. When I try to upload
an object to AWS S3 using the {{upload_object_via_stream}} method and there is an error (I'll
create a separate ticket for that, which I've also determined the cause of), {{libcloud}}
will ignore the 5xx error response from {{requests}} and set the status to the default of
> The reason this occurs is because the constructor of {{RawResponse}} has an optional
argument {{response}} which has a default value of {{None}}. The body of the constructor checks
[{{if response}}|]
to check if a response was passed into the constructor, but it turns out that the {{requests}}
library [overloads the {{__nonzero__}}/{{__bool__}} methods|]
to return {{False}} if the response status code is 4xx or 5xx. This [has been fixed|]
in the 3.0 branch of {{requests}}, but version 3.0 hasn't been released yet, so this currently
affects all versions of requests.
> I will submit a pull request with the small change to fix this.

This message was sent by Atlassian JIRA

View raw message