deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marios Andreou (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DTACLOUD-174) Executing "GET api/buckets/:bucket_id/:blob_id" where blob_id is non-existant returns 200 OK
Date Thu, 29 Mar 2012 13:10:26 GMT

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

Marios Andreou resolved DTACLOUD-174.
-------------------------------------

    Resolution: Fixed
      Assignee: Ronelle Landy  (was: Marios Andreou)

pushed to master:

commit a16c34de06776f91fb68cc49e6e1f7d2c815fc01
Author: marios <marios@redhat.com>
Date:   Mon Mar 26 15:07:25 2012 +0300

    Fixes DTACLOUD_174: GET on non-existant blob should return 404 (ec2 driver was giving
200OK)
    
    https://issues.apache.org/jira/browse/DTACLOUD-174

                
> 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

        

Mime
View raw message