Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 57134 invoked from network); 9 May 2010 19:49:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 May 2010 19:49:06 -0000 Received: (qmail 87169 invoked by uid 500); 9 May 2010 19:49:05 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 87122 invoked by uid 500); 9 May 2010 19:49:05 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 87114 invoked by uid 99); 9 May 2010 19:49:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 May 2010 19:49:05 +0000 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=FREEMAIL_FROM,FREEMAIL_REPLY,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of robert.newson@gmail.com designates 74.125.82.52 as permitted sender) Received: from [74.125.82.52] (HELO mail-ww0-f52.google.com) (74.125.82.52) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 May 2010 19:48:57 +0000 Received: by wwb34 with SMTP id 34so1645237wwb.11 for ; Sun, 09 May 2010 12:48:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=REC9tXPtzjjLUyPm3pNI7l7kb9ZLNa4Zr6QMJE+DgEU=; b=J6k6bX/G0E6q3MIWEqQyP9ON+C6Cpmipl6yo1ppibrqRQIyCQS1HXsrSGnFnVDKHyV 5+Wqhflmi8SMYDZRgiIF7eIX/1njDME7QQfDPLuxr5VWzndKMm3YhFBSpWSr/djuPHGP Cod+D7pXVEALG1rx4yzA/TLwGVxmpW8KkMo7E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=VdNGXrmNVlrnQUuH+Q+/ZLQsqYwE+xb3XXH6VUm1Rsa1/9Ra6GyjPyuJzoP+KP5OFS EyloDbX14dTi88nTWfYU735FexB4FGjOALmUN/1CucBrk1T43TfCeED+SrKCBaM+bbBX 76wBAwpZCJD+6HD4u/xw5v3LVGoC9wgjdPyo4= MIME-Version: 1.0 Received: by 10.216.85.7 with SMTP id t7mr514262wee.114.1273434516463; Sun, 09 May 2010 12:48:36 -0700 (PDT) Received: by 10.216.7.212 with HTTP; Sun, 9 May 2010 12:48:36 -0700 (PDT) In-Reply-To: References: Date: Sun, 9 May 2010 20:48:36 +0100 Message-ID: Subject: Re: Content-Length: 0 when curling -I attachments. From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 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 wr= ote: > Hi Richy, > > what about if you do curl -X HEAD ... ? > > My curl's man page says: > > " -l/--list-only > =A0 =A0 =A0 =A0 =A0 =A0 =A0(FTP) When listing an FTP directory, this swit= ch forces a > name-only view. =A0Especially useful if you =A0want =A0to > =A0 =A0 =A0 =A0 =A0 =A0 =A0machine-parse the contents of an FTP directory= since the > normal directory view doesn't use a standard look or > =A0 =A0 =A0 =A0 =A0 =A0 =A0format. > > =A0 =A0 =A0 =A0 =A0 =A0 =A0This option causes an FTP NLST command to be s= ent. =A0Some FTP > servers list only files =A0in =A0their =A0response =A0to > =A0 =A0 =A0 =A0 =A0 =A0 =A0NLST; they do not include subdirectories and s= ymbolic links." > > It seems that flag is for FTP only, not HTTP. > > On Sun, May 9, 2010 at 5:05 PM, Richy 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." >