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
