You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Richy <kl...@gmail.com> on 2010/05/09 18:05:36 UTC
Content-Length: 0 when curling -I attachments.
Hey there,
I always get "Conent-Length: 0" when using:
curl -I ...6dc348cef2297a8f4f2280d4100003b6/qrcode.png
HTTP/1.1 200 OK
Server: CouchDB/0.11.0 (Erlang OTP/R13B)
ETag: "28-439f0ba4de3216513bf59c4bc10b293d"
Date: Sun, 09 May 2010 15:58:45 GMT
Content-Type: image/png
Content-Length: 0
Cache-Control: must-revalidate
curl -I 6dc348cef2297a8f4f2280d4100005af/testiohone.mp4
HTTP/1.1 200 OK
Server: CouchDB/0.11.0 (Erlang OTP/R13B)
ETag: "12-a2fa92efb63b45ee014fa0838ad329e6"
Date: Sun, 09 May 2010 15:56:55 GMT
Content-Type: video/mp4
Content-Length: 0
Cache-Control: must-revalidate
This is true for Attachments only and similar to this bug:
https://issues.apache.org/jira/browse/COUCHDB-385
Is this a known issue and how can i fix it?
Thanks
Richard
Re: Content-Length: 0 when curling -I attachments.
Posted by Nils Breunese <N....@vpro.nl>.
Filipe David Manana wrote:
> what about if you do curl -X HEAD ... ?
curl -X HEAD does not work, you'll need to use curl -I (or curl --head)
instead.
Nils.
De informatie vervat in deze e-mail en meegezonden bijlagen is uitsluitend bedoeld voor gebruik door de geadresseerde en kan vertrouwelijke informatie bevatten. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van deze informatie aan derden is voorbehouden aan geadresseerde. De VPRO staat niet in voor de juiste en volledige overbrenging van de inhoud van een verzonden e-mail, noch voor tijdige ontvangst daarvan.
Re: Content-Length: 0 when curling -I attachments.
Posted by Robert Newson <ro...@gmail.com>.
bah, of course I mean 0.11.0 (forgive me!)
B.
On Sun, May 9, 2010 at 8:48 PM, Robert Newson <ro...@gmail.com> wrote:
> The HEAD behavior of trunk is much improved over 0.5.0. You should now
> receive a sensible Content-Length header as long as you didn't upload
> already compressed attachments and then download them without
> compression (as couchdb, in this case, does not know the uncompressed
> length).
>
> B.
>
> On Sun, May 9, 2010 at 7:52 PM, Filipe David Manana <fd...@gmail.com> wrote:
>> Hi Richy,
>>
>> what about if you do curl -X HEAD ... ?
>>
>> My curl's man page says:
>>
>> " -l/--list-only
>> (FTP) When listing an FTP directory, this switch forces a
>> name-only view. Especially useful if you want to
>> machine-parse the contents of an FTP directory since the
>> normal directory view doesn't use a standard look or
>> format.
>>
>> This option causes an FTP NLST command to be sent. Some FTP
>> servers list only files in their response to
>> NLST; they do not include subdirectories and symbolic links."
>>
>> It seems that flag is for FTP only, not HTTP.
>>
>> On Sun, May 9, 2010 at 5:05 PM, Richy <kl...@gmail.com> wrote:
>>
>>> Hey there,
>>>
>>> I always get "Conent-Length: 0" when using:
>>>
>>>
>>> curl -I ...6dc348cef2297a8f4f2280d4100003b6/qrcode.png
>>> HTTP/1.1 200 OK
>>> Server: CouchDB/0.11.0 (Erlang OTP/R13B)
>>> ETag: "28-439f0ba4de3216513bf59c4bc10b293d"
>>> Date: Sun, 09 May 2010 15:58:45 GMT
>>> Content-Type: image/png
>>> Content-Length: 0
>>> Cache-Control: must-revalidate
>>>
>>>
>>> curl -I 6dc348cef2297a8f4f2280d4100005af/testiohone.mp4
>>> HTTP/1.1 200 OK
>>> Server: CouchDB/0.11.0 (Erlang OTP/R13B)
>>> ETag: "12-a2fa92efb63b45ee014fa0838ad329e6"
>>> Date: Sun, 09 May 2010 15:56:55 GMT
>>> Content-Type: video/mp4
>>> Content-Length: 0
>>> Cache-Control: must-revalidate
>>>
>>> This is true for Attachments only and similar to this bug:
>>> https://issues.apache.org/jira/browse/COUCHDB-385
>>>
>>> Is this a known issue and how can i fix it?
>>> Thanks
>>>
>>> Richard
>>>
>>
>>
>>
>> --
>> Filipe David Manana,
>> fdmanana@gmail.com
>>
>> "Reasonable men adapt themselves to the world.
>> Unreasonable men adapt the world to themselves.
>> That's why all progress depends on unreasonable men."
>>
>
Re: Content-Length: 0 when curling -I attachments.
Posted by Robert Newson <ro...@gmail.com>.
The HEAD behavior of trunk is much improved over 0.5.0. You should now
receive a sensible Content-Length header as long as you didn't upload
already compressed attachments and then download them without
compression (as couchdb, in this case, does not know the uncompressed
length).
B.
On Sun, May 9, 2010 at 7:52 PM, Filipe David Manana <fd...@gmail.com> wrote:
> Hi Richy,
>
> what about if you do curl -X HEAD ... ?
>
> My curl's man page says:
>
> " -l/--list-only
> (FTP) When listing an FTP directory, this switch forces a
> name-only view. Especially useful if you want to
> machine-parse the contents of an FTP directory since the
> normal directory view doesn't use a standard look or
> format.
>
> This option causes an FTP NLST command to be sent. Some FTP
> servers list only files in their response to
> NLST; they do not include subdirectories and symbolic links."
>
> It seems that flag is for FTP only, not HTTP.
>
> On Sun, May 9, 2010 at 5:05 PM, Richy <kl...@gmail.com> wrote:
>
>> Hey there,
>>
>> I always get "Conent-Length: 0" when using:
>>
>>
>> curl -I ...6dc348cef2297a8f4f2280d4100003b6/qrcode.png
>> HTTP/1.1 200 OK
>> Server: CouchDB/0.11.0 (Erlang OTP/R13B)
>> ETag: "28-439f0ba4de3216513bf59c4bc10b293d"
>> Date: Sun, 09 May 2010 15:58:45 GMT
>> Content-Type: image/png
>> Content-Length: 0
>> Cache-Control: must-revalidate
>>
>>
>> curl -I 6dc348cef2297a8f4f2280d4100005af/testiohone.mp4
>> HTTP/1.1 200 OK
>> Server: CouchDB/0.11.0 (Erlang OTP/R13B)
>> ETag: "12-a2fa92efb63b45ee014fa0838ad329e6"
>> Date: Sun, 09 May 2010 15:56:55 GMT
>> Content-Type: video/mp4
>> Content-Length: 0
>> Cache-Control: must-revalidate
>>
>> This is true for Attachments only and similar to this bug:
>> https://issues.apache.org/jira/browse/COUCHDB-385
>>
>> Is this a known issue and how can i fix it?
>> Thanks
>>
>> Richard
>>
>
>
>
> --
> Filipe David Manana,
> fdmanana@gmail.com
>
> "Reasonable men adapt themselves to the world.
> Unreasonable men adapt the world to themselves.
> That's why all progress depends on unreasonable men."
>
Re: Content-Length: 0 when curling -I attachments.
Posted by Filipe David Manana <fd...@gmail.com>.
Hi Richy,
what about if you do curl -X HEAD ... ?
My curl's man page says:
" -l/--list-only
(FTP) When listing an FTP directory, this switch forces a
name-only view. Especially useful if you want to
machine-parse the contents of an FTP directory since the
normal directory view doesn't use a standard look or
format.
This option causes an FTP NLST command to be sent. Some FTP
servers list only files in their response to
NLST; they do not include subdirectories and symbolic links."
It seems that flag is for FTP only, not HTTP.
On Sun, May 9, 2010 at 5:05 PM, Richy <kl...@gmail.com> wrote:
> Hey there,
>
> I always get "Conent-Length: 0" when using:
>
>
> curl -I ...6dc348cef2297a8f4f2280d4100003b6/qrcode.png
> HTTP/1.1 200 OK
> Server: CouchDB/0.11.0 (Erlang OTP/R13B)
> ETag: "28-439f0ba4de3216513bf59c4bc10b293d"
> Date: Sun, 09 May 2010 15:58:45 GMT
> Content-Type: image/png
> Content-Length: 0
> Cache-Control: must-revalidate
>
>
> curl -I 6dc348cef2297a8f4f2280d4100005af/testiohone.mp4
> HTTP/1.1 200 OK
> Server: CouchDB/0.11.0 (Erlang OTP/R13B)
> ETag: "12-a2fa92efb63b45ee014fa0838ad329e6"
> Date: Sun, 09 May 2010 15:56:55 GMT
> Content-Type: video/mp4
> Content-Length: 0
> Cache-Control: must-revalidate
>
> This is true for Attachments only and similar to this bug:
> https://issues.apache.org/jira/browse/COUCHDB-385
>
> Is this a known issue and how can i fix it?
> Thanks
>
> Richard
>
--
Filipe David Manana,
fdmanana@gmail.com
"Reasonable men adapt themselves to the world.
Unreasonable men adapt the world to themselves.
That's why all progress depends on unreasonable men."