[Openstack-operators] Problem send HTTP GET request.

Salman Zubair Toor salman.toor at it.uu.se
Wed Nov 9 12:13:54 UTC 2011


Hi,

I am trying to get the object from Swift store using GET request  
header but facing some problem,

I read from the following document

http://docs.openstack.org/bexar/openstack-object-storage/developer/content/ch03s03.html

That the header should look like this

GET /<api version>/<account>/<container>/<object> HTTP/1.1
   Host: storage.swiftdrive.com
   X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb

I did the same and make my GET request something like this

----------------------------------------------------------------------------------
GET /v1.0/system:root/rootContainer/eventdata.root HTTP/1.1
Host: swift.uppmax.se
Authorization: AWS system:root:VTbBHyLrCdLnxClvd1bVFZcLpy8=

----------------------------------------------------------------------------------

Not that the last line is empty right after the Authentication. But it  
just hangs. no answer form the server. I try to change the header to  
get it working but no success :-( . Try-4 is interesting.

Following are my tries..

Try -1

----------------------------------------------------------------------------------
GET /v1.0/system:root/rootContainer/eventdata.root HTTP/1.1
Host: swift.uppmax.se
Authorization: AWS system:root:yR7OHVFGgsZ4xHJp7RKHv9CuNtY=


----------------------------------------------------------------------------------
Now two empty line in the end. and I got the following response.

HTTP/1.1 403 Forbidden
Content-Type: text/xml; charset=UTF-8
Content-Length: 124
Date: Wed, 09 Nov 2011 11:47:47 GMT


Try-2

----------------------------------------------------------------------------------
GET /v1.0/root/rootContainer/eventdata.root HTTP/1.1
Host: swift.uppmax.se
Authorization: AWS system:root:R9She9vkYVXQszVMfDqaeTNtUhQ=

----------------------------------------------------------------------------------
change account from system:root to root (I don't know why but just  
want to try) ....

HTTP/1.1 403 Forbidden
Content-Type: text/xml; charset=UTF-8
Content-Length: 124
Date: Wed, 09 Nov 2011 11:47:47 GMT


Try-3

----------------------------------------------------------------------------------
GET /v1.0/system:root/rootContainer/eventdata.root HTTP/1.1
Host: swift.uppmax.se
Date: Wed, 09 Nov 2011 12:03:06 GMT
Range: bytes=0-3
Authorization: AWS system:root:pHhOqVriW4zNmBW9MO1a7rNhHjI=


----------------------------------------------------------------------------------

HTTP/1.1 403 Forbidden
Content-Type: text/xml; charset=UTF-8
Content-Length: 124
Date: Wed, 09 Nov 2011 11:47:47 GMT


Try-4

----------------------------------------------------------------------------------
GET /rootContainer/eventdata.root HTTP/1.1
Host: swift.uppmax.se
Date: Wed, 09 Nov 2011 12:04:57 GMT
Range: bytes=0-3
Authorization: AWS system:root:oQX68HKwnH1OnBJhTmHGz3cm4b4=


----------------------------------------------------------------------------------
I have removed the version and the account details  and then at least  
the request message get changed. No more forbidden response. But now  
its "206 Partial Content" and after getting the headers  the read  
bytes are 0.


HTTP/1.1 206 Partial Content
n: 44
line: Last-Modified: Tue, 01 Nov 2011 16:13:21 GMT
n: 17
line: Content-Length: 4
n: 38
line: Etag: f3e0c75e57766c5581a6978e2b70698f
n: 38
line: Content-Type: application/octet-stream
n: 35
line: Date: Wed, 09 Nov 2011 12:01:30 GMT
n: 0
line:
n: 4
line: root
n: 0
line:

Then I send only HEAD request without version and account and that  
runs successfully

------------------------------------------------------------------------------------------
HEAD /rootContainer/eventdata.root HTTP/1.1
Host: swift.uppmax.se
Date: Wed, 09 Nov 2011 12:14:11 GMT
Authorization: AWS system:root:dAWDu4I8SJyY02HEIirYejDWn2w=


------------------------------------------------------------------------------------------

gDebug Header: HTTP/1.1 200 OK
gDebug Header: Last-Modified: Tue, 01 Nov 2011 16:13:21 GMT
gDebug Header: Content-Length: 13
gDebug Header: Etag: f3e0c75e57766c5581a6978e2b70698f
gDebug Header: Content-Type: text/plain
gDebug Header: Date: Wed, 09 Nov 2011 12:10:45 GMT



If I use command line tool everything is working fine. Can someone  
please point out what is wrong or how should I modify things.

Thanks.


Salman Zubair Toor
Ph.Lic. Scientific Computing
Ph.D candidate
Division of Scientific Computing
Uppsala University, Sweden
salman.toor at it.uu.se



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-operators/attachments/20111109/5fa05299/attachment-0002.html>


More information about the Openstack-operators mailing list