<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, <div><br></div><div>I am trying to get the object from Swift store using GET request header but facing some problem, </div><div><br></div><div>I read from the following document </div><div><br></div><div><a href="http://docs.openstack.org/bexar/openstack-object-storage/developer/content/ch03s03.html">http://docs.openstack.org/bexar/openstack-object-storage/developer/content/ch03s03.html</a></div><div><br></div><div>That the header should look like this </div><div><br></div><div><pre class="literallayout"><a id="d5e627">GET /<api version>/<account>/<container>/<object> HTTP/1.1
  Host: storage.swiftdrive.com
  X-Auth-Token: eaaafd18-0fed-4b3a-81b4-663c99ec1cbb
</a></pre><div><br></div><div>I did the same and make my GET request something like this</div><div> </div><div>----------------------------------------------------------------------------------</div><div><div>GET /v1.0/system:root/rootContainer/eventdata.root HTTP/1.1 </div><div>Host: <a href="http://swift.uppmax.se">swift.uppmax.se</a></div><div>Authorization: AWS system:root:VTbBHyLrCdLnxClvd1bVFZcLpy8=</div><div><br></div><div>----------------------------------------------------------------------------------</div><div><br></div><div>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 :-( . <b>Try-4 is interesting</b>. </div><div><br></div><div>Following are my tries.. </div><div><br></div><div>Try -1</div><div><br></div><div>----------------------------------------------------------------------------------</div><div><div>GET /v1.0/system:root/rootContainer/eventdata.root HTTP/1.1 </div><div>Host: <a href="http://swift.uppmax.se">swift.uppmax.se</a></div><div>Authorization: AWS system:root:yR7OHVFGgsZ4xHJp7RKHv9CuNtY=</div><div><br></div><div><br></div></div><div>----------------------------------------------------------------------------------</div><div>Now two empty line in the end. and I got the following response. </div><div><br></div><div><div>HTTP/1.1 403 Forbidden</div><div>Content-Type: text/xml; charset=UTF-8</div><div>Content-Length: 124</div><div>Date: Wed, 09 Nov 2011 11:47:47 GMT</div><div><br></div></div><div><br></div><div>Try-2 </div><div><br></div><div>----------------------------------------------------------------------------------</div><div><div>GET /v1.0/root/rootContainer/eventdata.root HTTP/1.1 </div><div>Host: swift.<a href="http://uppmax.se">uppmax.se</a></div><div>Authorization: AWS system:root:R9She9vkYVXQszVMfDqaeTNtUhQ=</div><div><br></div></div><div>----------------------------------------------------------------------------------</div><div>change account from system:root to root (I don't know why but just want to try) .... </div><div><br></div><div><div>HTTP/1.1 403 Forbidden</div><div>Content-Type: text/xml; charset=UTF-8</div><div>Content-Length: 124</div><div>Date: Wed, 09 Nov 2011 11:47:47 GMT</div><div><br></div><div><br></div><div>Try-3 </div><div><br></div><div><div>----------------------------------------------------------------------------------</div><div>GET /v1.0/system:root/rootContainer/eventdata.root HTTP/1.1 </div><div>Host: swift.<a href="http://uppmax.se">uppmax.se</a></div><div>Date: Wed, 09 Nov 2011 12:03:06 GMT</div><div>Range: bytes=0-3</div><div>Authorization: AWS system:root:pHhOqVriW4zNmBW9MO1a7rNhHjI=</div><div><br></div><div><br></div><div>----------------------------------------------------------------------------------</div><div><br></div><div><div>HTTP/1.1 403 Forbidden</div><div>Content-Type: text/xml; charset=UTF-8</div><div>Content-Length: 124</div><div>Date: Wed, 09 Nov 2011 11:47:47 GMT</div></div></div></div></div></div><div><br></div><div><br></div><div>Try-4</div><div><br></div><div>----------------------------------------------------------------------------------</div><div><div>GET /rootContainer/eventdata.root HTTP/1.1 </div><div>Host: swift.<a href="http://uppmax.se">uppmax.se</a></div><div>Date: Wed, 09 Nov 2011 12:04:57 GMT</div><div>Range: bytes=0-3</div><div>Authorization: AWS system:root:oQX68HKwnH1OnBJhTmHGz3cm4b4=</div><div><br></div><div><br></div></div><div>----------------------------------------------------------------------------------</div><div>I have removed the <b>version and the account details</b>  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.  </div><div><br></div><div><br></div><div><div>HTTP/1.1 206 Partial Content</div><div>n: 44</div><div>line: Last-Modified: Tue, 01 Nov 2011 16:13:21 GMT</div><div>n: 17</div><div>line: Content-Length: 4</div><div>n: 38</div><div>line: Etag: f3e0c75e57766c5581a6978e2b70698f</div><div>n: 38</div><div>line: Content-Type: application/octet-stream</div><div>n: 35</div><div>line: Date: Wed, 09 Nov 2011 12:01:30 GMT</div><div>n: 0</div><div>line: </div><div>n: 4</div><div>line: root</div><div>n: 0</div><div>line: </div><div><br></div><div>Then I send only HEAD request without version and account and that runs successfully</div><div><br></div><div>------------------------------------------------------------------------------------------</div><div><div>HEAD /rootContainer/eventdata.root HTTP/1.1</div><div>Host: <a href="http://swift.uppmax.se">swift.uppmax.se</a></div><div>Date: Wed, 09 Nov 2011 12:14:11 GMT</div><div>Authorization: AWS system:root:dAWDu4I8SJyY02HEIirYejDWn2w=</div><div><br></div><div><br></div></div><div>------------------------------------------------------------------------------------------</div><div><br></div><div><div>gDebug Header: HTTP/1.1 200 OK</div><div>gDebug Header: Last-Modified: Tue, 01 Nov 2011 16:13:21 GMT</div><div>gDebug Header: Content-Length: 13</div><div>gDebug Header: Etag: f3e0c75e57766c5581a6978e2b70698f</div><div>gDebug Header: Content-Type: text/plain</div><div>gDebug Header: Date: Wed, 09 Nov 2011 12:10:45 GMT</div><div><br></div></div><div><br></div><div><br></div></div><div>If I use command line tool everything is working fine. Can someone please point out what is wrong or how should I modify things. </div><div><br></div><div>Thanks. </div><div><br></div><div><br><div>
<div>Salman Zubair Toor</div><div>Ph.Lic. Scientific Computing</div><div>Ph.D candidate</div><div>Division of Scientific Computing </div><div>Uppsala University, Sweden </div><div><a href="mailto:salman.toor@it.uu.se">salman.toor@it.uu.se</a></div><div><br></div><br class="Apple-interchange-newline">
</div>
<br></div></body></html>