couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Caolan McMahon <caolan.mcma...@gmail.com>
Subject Re: svn commit: r1126332 - /couchdb/trunk/src/couchdb/couch_httpd.erl
Date Mon, 23 May 2011 16:10:55 GMT
Just to be clear, jQuery always appends '*/*' to the Accepts header when
making ajax requests. And it doesn't set a q value.

That means without this patch it is impossible to get a 401 response
from CouchDB using jQuery, you are always redirected. Its quite possible
they have a good reason for doing it that way, so other ajax libraries
might suffer from the same problem.

I definitely think this needs to be merged into 1.1.x otherwise it's
going to cause a lot of problems with CouchApps!

I agree the *correct* solution would be to use
MochiReq:accepted_encodings and cycle through the accepted content types
in order of preference until one is supported. Unfortuntely it seems
CouchApps can't work reliably with that system, being unable to set a
preference.


Caolan

Mime
View raw message