You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by "Tomaz Muraus (JIRA)" <ji...@apache.org> on 2013/07/16 20:44:49 UTC

[dev] [jira] [Comment Edited] (LIBCLOUD-362) GoGrid bug: Length Required

    [ https://issues.apache.org/jira/browse/LIBCLOUD-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13710069#comment-13710069 ] 

Tomaz Muraus edited comment on LIBCLOUD-362 at 7/16/13 6:44 PM:
----------------------------------------------------------------

Uh, this is actually a regression which I have introduced in 0.13.0 (https://github.com/apache/libcloud/commit/5e782bf932ad39b0242dee42ef0d29f2a391d780).

Previously we also included `Content-Length: 0` header with every HTTP GET request. IIRC `Content-Length: 0` is not explicitly forbidden in HTTP GET requests, but it's confusing and not a good practice.

I guess a better solution would be to only include `Content-Length: 0` with the methods which support a body (POST, PUT, ...).

[~pquerna] wdyt?
                
      was (Author: kami):
    Uh, this is actually a regression which I have introduced in 0.13.0.

Previously we also included `Content-Length: 0` header with every HTTP GET request. IIRC `Content-Length: 0` is not explicitly forbidden in HTTP GET requests, but it's confusing and not a good practice.

I guess a better solution would be to only include `Content-Length: 0` with the methods which support a body (POST, PUT, ...).

[~pquerna] wdyt?
                  
> GoGrid bug: Length Required
> ---------------------------
>
>                 Key: LIBCLOUD-362
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-362
>             Project: Libcloud
>          Issue Type: Bug
>            Reporter: Bob Thompson
>         Attachments: LIBCLOUD-362.patch
>
>
> GoGrid connection requests fail since GoGrid doesn't allow "zero-byte files" (HTTP 411). Right now, {data} defaults to None and therefore is not encoded to Content-Length.
> The data passed to the connection request should check for None instead of empty string and None. This way defaulting GoGrid to pass an empty string (as it was before) will fix the issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira