You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by "Marios Andreou (Assigned) (JIRA)" <ji...@apache.org> on 2012/03/26 14:24:29 UTC

[jira] [Assigned] (DTACLOUD-174) Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK

     [ https://issues.apache.org/jira/browse/DTACLOUD-174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marios Andreou reassigned DTACLOUD-174:
---------------------------------------

    Assignee: Ronelle Landy  (was: Marios Andreou)
    
> Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK
> --------------------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-174
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-174
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment:  - Deltacloud git commit version 7e372dfca79c02a799046287e5936129216b781b - branch 'master' of https://git-wip-us.apache.org/repos/asf/deltacloud
>  - ec2 provider
>  - Fedora 16, RHEL 6.2
>            Reporter: Ronelle Landy
>            Assignee: Ronelle Landy
>         Attachments: 0001-Fixes-DTACLOUD_174-GET-on-non-existant-blob-should-r.patch
>
>
> This issue was found by attempting to create a blob using the PUT format, but with empty upload_file. Deltacloud still says blob is created - GET api/buckets/:bucket_id does not return that blob.
>  (note from Marios - real bug is here) When you use --upload-file with no input, it actually does a GET.  GET on a non-existant blob returns 200 OK
>  curl  -H 'content-type: text/html' -H 'X-Deltacloud-Blobmeta-Name:myblob' -H  'X-Deltacloud-Blobmeta-Version:2.4' -H  'X-Deltacloud-Blobmeta-Author:rlandy' -iv --upload-file ""  --user  "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7?format=xml"
> * About to connect() to localhost port 3009 (#0)
> *   Trying 127.0.0.1... connected
> * Connected to localhost (127.0.0.1) port 3009 (#0)
> * Server auth using Basic with user 'AKIAJCBB265A57CGKR2Q'
> > GET /api/buckets/bucket-rlandy2/03222012blob7?format=xml HTTP/1.1
> (Note from Marios): HERE...^^^^^^^^^^^^^
> The real bug then is that a GET on a non-existant blob returns 200 OK. This is due to the s3 gem.
> > Authorization: Basic QUtJQUpDQkIyNjVBNTdDR0tSMlE6bVJxUG80QzU2NmVwT2F1SXhPNGZhRnNPZGVUeXVzN29PVmRIS2d3NQ==
> > User-Agent: curl/7.21.7 (x86_64-redhat-linux-gnu) libcurl/7.21.7 NSS/3.13.1.0 zlib/1.2.5 libidn/1.22 libssh2/1.2.7
> > Host: localhost:3009
> > Accept: */*
> > content-type: text/html
> > X-Deltacloud-Blobmeta-Name:myblob
> > X-Deltacloud-Blobmeta-Version:2.4
> > X-Deltacloud-Blobmeta-Author:rlandy
> > 
> < HTTP/1.1 200 OK
> HTTP/1.1 200 OK
> < Content-Type: application/xml
> Content-Type: application/xml
> < ETag: "1e2b9f0b138187d17b3858795ffff479"
> ETag: "1e2b9f0b138187d17b3858795ffff479"
> < X-Frame-Options: sameorigin
> X-Frame-Options: sameorigin
> < Server: Apache-Deltacloud/0.5.0
> Server: Apache-Deltacloud/0.5.0
> < Date: Thu, 22 Mar 2012 21:09:07 GMT
> Date: Thu, 22 Mar 2012 21:09:07 GMT
> < X-Runtime: 0.841249
> X-Runtime: 0.841249
> < X-XSS-Protection: 1; mode=block
> X-XSS-Protection: 1; mode=block
> < Content-Length: 417
> Content-Length: 417
> < Cache-Control: max-age=0, private, must-revalidate
> Cache-Control: max-age=0, private, must-revalidate
> < Connection: keep-alive
> Connection: keep-alive
> < 
> <?xml version='1.0' encoding='utf-8' ?>
> <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7' id='03222012blob7'>
>   <bucket>bucket-rlandy2</bucket>
>   <content_length></content_length>
>   <content_type></content_type>
>   <last_modified></last_modified>
>   <user_metadata>
>   </user_metadata>
>   <content href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob7/content'></content>
> </blob>
> * Connection #0 to host localhost left intact
> * Closing connection #0
> Note that 03222012blob7 is not returned here:
> [rlandy@localhost server]$ curl -X GET --user "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2?format=xml"
> <?xml version='1.0' encoding='utf-8' ?>
> <bucket href='http://localhost:3009/api/buckets/bucket-rlandy2' id='bucket-rlandy2'>
>   <name>bucket-rlandy2</name>
>   <size>6</size>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob1' id='03222012blob1'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob2' id='03222012blob2'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob3' id='03222012blob3'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob4' id='03222012blob4'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob5' id='03222012blob5'></blob>
>   <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob6' id='03222012blob6'></blob>
> </bucket>
> [rlandy@localhost server]$

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira