Hi Jon
The platform is using Digest authentication. Curl makes 2 requests when you post the file into the store. The first one recieves a 401 unauthorised and is given the nonce needed to make the request using digest authentication.
Here is the output of me doing the same. You can see curl receives a 401 unauthorised, but automatically uses the none to make a second request which succeeds.
Malcolm
ml@sookie:/tmp/n2-dev$ curl -v -d @sparql.js --digest -u "****:****" -H content-type:application/javascript
http://api.talis.com/stores/malcyl-dev2/items
* About to connect() to
api.talis.com port 80 (#0)
* Trying 82.147.9.14... connected
* Connected to
api.talis.com (82.147.9.14) port 80 (#0)
* Server auth using Digest with user '****'
> POST /stores/malcyl-dev2/items HTTP/1.1
> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/
1.2.3.3 libidn/1.10
> Host:
api.talis.com> Accept: */*
> content-type:application/javascript
> Content-Length: 0
>
< HTTP/1.1 401 Unauthorized
< Date: Thu, 10 Dec 2009 10:23:21 GMT
< WWW-Authenticate: Digest realm="bigfoot", domain="null", nonce="****", algorithm=MD5, qop="auth"
< Content-Type: text/plain; charset=UTF-8
< Content-Length: 12
< Connection: close
<
* Closing connection #0
* Issue another request to this URL: '
http://api.talis.com/stores/malcyl-dev2/items'
* About to connect() to
api.talis.com port 80 (#0)
* Trying 82.147.9.14... connected
* Connected to
api.talis.com (82.147.9.14) port 80 (#0)
* Server auth using Digest with user '****'
> POST /stores/malcyl-dev2/items HTTP/1.1
> Authorization: Digest username="su", realm="bigfoot", nonce="****", uri="/stores/malcyl-dev2/items", cnonce="****", nc=00000001, qop="auth", response="****", algorithm="MD5"
> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/
1.2.3.3 libidn/1.10
> Host:
api.talis.com> Accept: */*
> content-type:application/javascript
> Content-Length: 4
>
< HTTP/1.1 201 Created
< Date: Thu, 10 Dec 2009 10:23:22 GMT
< Server: Bigfoot/30.1258.56780
< Cache-Control: max-age=7200, must-revalidate
< Location:
http://api.talis.com/stores/malcyl-dev2/items/cda095ba-9ed0-49e2-8d17-9e5e5a0df214
< Content-Length: 0
< Connection: close
< Content-Type: text/plain; charset=UTF-8
<
--
--
email -
mal...@landonsonline.me.uk
web -
malcolm.landonsonline.me.uk