couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Alfke (JIRA)" <>
Subject [jira] Commented: (COUCHDB-265) HEAD requests get a Content-Length header
Date Mon, 23 Feb 2009 21:30:07 GMT


Jens Alfke commented on COUCHDB-265:

By the way, curl has exactly the same problem with HEAD requests to other servers, so I'd
say this is a bug in curl itself. (For example, try "curl -X HEAD".)

> HEAD requests get a Content-Length header
> -----------------------------------------
>                 Key: COUCHDB-265
>                 URL:
>             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/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.

View raw message