couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Joseph Davis (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-265) HEAD requests get a Content-Length header
Date Mon, 23 Feb 2009 21:28:02 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12676073#action_12676073
] 

Paul Joseph Davis commented on COUCHDB-265:
-------------------------------------------

Yeah. Noah just corrected me and I went back and reread the spec again which definitely says
that changes in content-length should be detectable. Guess this is just curl being dumb. Apologies
for the noise.

> 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
>
> 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.


Mime
View raw message