Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 30039 invoked from network); 23 Feb 2009 21:30:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Feb 2009 21:30:34 -0000 Received: (qmail 25251 invoked by uid 500); 23 Feb 2009 21:30:33 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 25213 invoked by uid 500); 23 Feb 2009 21:30:33 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 25200 invoked by uid 99); 23 Feb 2009 21:30:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Feb 2009 13:30:33 -0800 X-ASF-Spam-Status: No, hits=-1997.6 required=10.0 tests=ALL_TRUSTED,NORMAL_HTTP_TO_IP,URIBL_RHS_DOB,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Feb 2009 21:30:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 41D04234C48C for ; Mon, 23 Feb 2009 13:30:07 -0800 (PST) Message-ID: <437109978.1235424607255.JavaMail.jira@brutus> Date: Mon, 23 Feb 2009 13:30:07 -0800 (PST) From: "Paul Joseph Davis (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Closed: (COUCHDB-265) HEAD requests get a Content-Length header In-Reply-To: <1798883270.1235424002881.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul Joseph Davis closed COUCHDB-265. ------------------------------------- Resolution: Invalid Fix Version/s: 0.9 Should've read the spec before filing :D > HEAD requests get a Content-Length header > ----------------------------------------- > > Key: COUCHDB-265 > URL: https://issues.apache.org/jira/browse/COUCHDB-265 > Project: CouchDB > Issue Type: Bug > Components: HTTP Interface > Affects Versions: 0.9 > Environment: curl + trunk > Reporter: Paul Joseph Davis > Fix For: 0.9 > > > Looks like HEAD requests are returning a bogus Content-Length header. If I remember my HTTP spec correctly, HEAD requests are supposed to return no Content-Length or a Content-Length of 0 but I could be wrong on that. Either way, it confuses the crap out of curl: > $ curl -X HEAD -i http://127.0.0.1:5984/ > HTTP/1.1 200 OK > Server: CouchDB/0.9.0a (Erlang OTP/R12B) > Date: Mon, 23 Feb 2009 20:56:55 GMT > Content-Type: text/plain;charset=utf-8 > Content-Length: 40 > Cache-Control: must-revalidate > curl: (18) transfer closed with 40 bytes remaining to read > Also, I just happened to be reading couch_http.erl the other day and I remember seeing a note that said mochiweb automatically strips bodies so internally HEAD requests are treated like a GET and mochiweb I guess just doesn't send a body. That's probably important. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.