Content-Length header required when using nginx + couchdb

82 views
Skip to first unread message

John Griffin

unread,
Apr 4, 2010, 2:57:16 PM4/4/10
to CouchRest
I am using nginx in front of couchdb to provide SSL. Unfortunately
nginx insists on having Content-Length specified for each request. If
not a 411 Length required is sent back. See here:
http://permalink.gmane.org/gmane.comp.lang.javascript.nodejs/4219

I have been able to manually fix the problem by altering the methods
in CouchRest::Server eg

def create_db(name)
CouchRest.put "#{@uri}/#{name}", :headers => {"Content-Length"
=> "0"}
database(name)
end

Rather than going through each method and doing this is there a better
way to provide a default header across all requests? Would there be
any negative side affects to non nginx users if we do so?

Reply all
Reply to author
Forward
0 new messages