Skip to content

Instantly share code, notes, and snippets.

@notmyname
Created August 27, 2015 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notmyname/f8696896fb8f47b8d53b to your computer and use it in GitHub Desktop.
Save notmyname/f8696896fb8f47b8d53b to your computer and use it in GitHub Desktop.
$ curl -i -H "X-Auth-Token: AUTH_tk758ad312389f4260b090602fb3d557e0" http://saio:8080/v1/AUTH_test/test -XPUT
HTTP/1.1 201 Created
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txa76caf45d30a4feeb04dd-0055df22aa
Date: Thu, 27 Aug 2015 14:46:02 GMT
$ curl -i -H "X-Auth-Token: AUTH_tk758ad312389f4260b090602fb3d557e0" http://saio:8080/v1/AUTH_test/test/o1 --data-binary 1234 -XPUT
HTTP/1.1 201 Created
Last-Modified: Thu, 27 Aug 2015 14:46:13 GMT
Content-Length: 0
Etag: 81dc9bdb52d04dc20036dbd8313ed055
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx032454703af248d2b4347-0055df22b4
Date: Thu, 27 Aug 2015 14:46:12 GMT
$ curl -i -H "X-Auth-Token: AUTH_tk758ad312389f4260b090602fb3d557e0" http://saio:8080/v1/AUTH_test/test
HTTP/1.1 200 OK
Content-Length: 3
X-Container-Object-Count: 1
Accept-Ranges: bytes
X-Storage-Policy: legacy
X-Container-Bytes-Used: 4
X-Timestamp: 1440686762.11959
Content-Type: text/plain; charset=utf-8
X-Trans-Id: tx6bdfb04944234d9ab1a80-0055df22bc
Date: Thu, 27 Aug 2015 14:46:20 GMT
o1
$ curl -i -H "X-Auth-Token: AUTH_tk758ad312389f4260b090602fb3d557e0" http://saio:8080/v1/AUTH_test/test -XPOST "x-container-meta-web-listings: true"
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx58f40acc0db140d89e705-0055df22d1
Date: Thu, 27 Aug 2015 14:46:41 GMT
curl: (6) Could not resolve host: x-container-meta-web-listings
$ curl -i -H "X-Auth-Token: AUTH_tk758ad312389f4260b090602fb3d557e0" http://saio:8080/v1/AUTH_test/test -XPOST -H "x-container-meta-web-listings: true"
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx3dfbcf496e8545dab7241-0055df22da
Date: Thu, 27 Aug 2015 14:46:50 GMT
$
$ curl -i -H "X-Auth-Token: AUTH_tk758ad312389f4260b090602fb3d557e0" http://saio:8080/v1/AUTH_test/test
HTTP/1.1 200 OK
X-Container-Meta-Web-Listings: true
Content-Length: 3
X-Container-Object-Count: 1
Accept-Ranges: bytes
X-Storage-Policy: legacy
X-Container-Bytes-Used: 4
X-Timestamp: 1440686762.11319
Content-Type: text/plain; charset=utf-8
X-Trans-Id: tx6512dc032821466a91126-0055df22de
Date: Thu, 27 Aug 2015 14:46:54 GMT
o1
$ curl -i http://saio:8080/v1/AUTH_test/test/
HTTP/1.1 200 OK
Content-Length: 818
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txb87204b698384b07900c0-0055df22ec
Date: Thu, 27 Aug 2015 14:47:08 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Listing of /v1/AUTH_test/test/</title>
<style type="text/css">
h1 {font-size: 1em; font-weight: bold;}
th {text-align: left; padding: 0px 1em 0px 1em;}
td {padding: 0px 1em 0px 1em;}
a {text-decoration: none;}
</style>
</head>
<body>
<h1 id="title">Listing of /v1/AUTH_test/test/</h1>
<table id="listing">
<tr id="heading">
<th class="colname">Name</th>
<th class="colsize">Size</th>
<th class="coldate">Date</th>
</tr>
<tr class="item type-application type-x-www-form-urlencoded">
<td class="colname"><a href="o1">o1</a></td>
<td class="colsize">4</td>
<td class="coldate">2015-08-27 14:46:12</td>
</tr>
</table>
</body>
</html>
$ curl -i -H "X-Auth-Token: AUTH_tk758ad312389f4260b090602fb3d557e0" http://saio:8080/v1/AUTH_test/test -XPOST -H "x-remote-container-meta-web-listings: x"
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx325a5206fd38487199fa2-0055df22fb
Date: Thu, 27 Aug 2015 14:47:23 GMT
$ curl -i http://saio:8080/v1/AUTH_test/test/
HTTP/1.1 200 OK
Content-Length: 818
Content-Type: text/html; charset=UTF-8
X-Trans-Id: tx9f334eab31e049ea82934-0055df22ff
Date: Thu, 27 Aug 2015 14:47:27 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Listing of /v1/AUTH_test/test/</title>
<style type="text/css">
h1 {font-size: 1em; font-weight: bold;}
th {text-align: left; padding: 0px 1em 0px 1em;}
td {padding: 0px 1em 0px 1em;}
a {text-decoration: none;}
</style>
</head>
<body>
<h1 id="title">Listing of /v1/AUTH_test/test/</h1>
<table id="listing">
<tr id="heading">
<th class="colname">Name</th>
<th class="colsize">Size</th>
<th class="coldate">Date</th>
</tr>
<tr class="item type-application type-x-www-form-urlencoded">
<td class="colname"><a href="o1">o1</a></td>
<td class="colsize">4</td>
<td class="coldate">2015-08-27 14:46:12</td>
</tr>
</table>
</body>
</html>
$ curl -i -H "X-Auth-Token: AUTH_tk758ad312389f4260b090602fb3d557e0" http://saio:8080/v1/AUTH_test/test
HTTP/1.1 200 OK
X-Container-Meta-Web-Listings: true
Content-Length: 3
X-Container-Object-Count: 1
Accept-Ranges: bytes
X-Storage-Policy: legacy
X-Container-Bytes-Used: 4
X-Timestamp: 1440686762.11959
Content-Type: text/plain; charset=utf-8
X-Trans-Id: tx00140499c84a4862b001c-0055df2304
Date: Thu, 27 Aug 2015 14:47:32 GMT
o1
$ curl -i -H "X-Auth-Token: AUTH_tk758ad312389f4260b090602fb3d557e0" http://saio:8080/v1/AUTH_test/test -XPOST -H "x-remove-container-meta-web-listings: x"
HTTP/1.1 204 No Content
Content-Length: 0
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txb70607b1e73d4fa3b076b-0055df230d
Date: Thu, 27 Aug 2015 14:47:41 GMT
$ curl -i -H "X-Auth-Token: AUTH_tk758ad312389f4260b090602fb3d557e0" http://saio:8080/v1/AUTH_test/test
HTTP/1.1 200 OK
Content-Length: 3
X-Container-Object-Count: 1
Accept-Ranges: bytes
X-Storage-Policy: legacy
X-Container-Bytes-Used: 4
X-Timestamp: 1440686762.11561
Content-Type: text/plain; charset=utf-8
X-Trans-Id: tx14d5b03bbed3414ebbfb4-0055df230f
Date: Thu, 27 Aug 2015 14:47:43 GMT
o1
$ curl -i http://saio:8080/v1/AUTH_test/test/
HTTP/1.1 401 Unauthorized
Content-Length: 131
Content-Type: text/html; charset=UTF-8
Www-Authenticate: Swift realm="AUTH_test"
X-Trans-Id: txa790d3f9afc34393accd9-0055df2311
Date: Thu, 27 Aug 2015 14:47:45 GMT
<html><h1>Unauthorized</h1><p>This server could not verify that you are authorized to access the document you requested.</p></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment