couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcello Nuccio <marcello.nuc...@gmail.com>
Subject Re: Debian couchdb-1.1.0-2b is broken
Date Thu, 13 Oct 2011 10:02:54 GMT
2011/10/13 Benoit Chesneau <bchesneau@gmail.com>:
> On Thu, Oct 13, 2011 at 10:07 AM, Marcello Nuccio
> <marcello.nuccio@gmail.com> wrote:
>> 2011/10/13 Benoit Chesneau <bchesneau@gmail.com>:
>>> On Thu, Oct 13, 2011 at 12:53 AM, Panop Suvaphrom <PSuvaphrom@vizrt.com>
wrote:
>>>> Hi,
>>>>
>>>> I know that it is not possible to update the document without current version.
>>>>
>>>> But anyway, I would like to make sure about this.
>>>> Is there a way to update a document without knowing its current revision?
>>>> I would like to avoid first GETting current version…
>>>
>>> Just HEAD it then and get the etag. It's not possible to update
>>> without giving a revision to answer to your question.
>>
>> I've just tried it but I've found a problem. Here's what I do using curl:
>>
>>    $ curl -D- -X HEAD http://localhost:5984/_users/_design/_auth
>>    HTTP/1.1 200 OK
>>    Server: CouchDB/1.1.0 (Erlang OTP/R14B03)
>>    Etag: "1-c44fb12a2676d481d235523092e0cec4"
>>    Date: Thu, 13 Oct 2011 08:01:35 GMT
>>    Content-Type: text/plain;charset=utf-8
>>    Content-Length: 3126
>>    Cache-Control: must-revalidate
>>
>>    curl: (18) transfer closed with 3126 bytes remaining to read
>>    $ echo $?
>>    18
>>    $
>>
>> i.e.: CouchDB returns the Content-Length of the document, and curl
>> waits for it until it times out and exit with error 18.
>>
>> Am I doing something stupid?
>> Marcello
>>
>
> use the "-I" option :)
>
> - benoit

OK, I was doing something stupid... :-)
The funny thing is: I do know the '-I' option.

For posterity, the right command is:

    curl -I http://localhost:5984/_users/_design/_auth

Marcello

Mime
View raw message