Closed adrienverge closed 8 years ago
Thanks for the report! To me, this actually seems like a bug in CouchDB. Did you discuss with them? If they can justify this behavior, I'm happy to accept your patch.
To me, this actually seems like a bug in CouchDB.
Actually you're right... I'll try to see with them!
So I am trying to see what CouchDB-Python actually sends in terms of the HTTP request, but it's not making sense to me. Note I'm not running CouchDB-2.0 yet, so I can't exactly reproduce the bug you're seeing. What version of Python are you using? Can you let me know what we send? I've been using variations on this patch to try and debug:
diff --git a/couchdb/http.py b/couchdb/http.py
index 7e6e509..ef49620 100644
--- a/couchdb/http.py
+++ b/couchdb/http.py
@@ -11,6 +11,7 @@
standard library.
"""
+from __future__ import print_function
from base64 import b64encode
from datetime import datetime
import errno
@@ -310,6 +311,7 @@ class Session(object):
conn.putrequest(method, path_query, skip_accept_encoding=True)
for header in headers:
conn.putheader(header, headers[header])
+ print('BUFFER', conn._buffer)
if body is None:
conn.endheaders()
else:
Hey @djc,
When trying to reproduce on a clean setup, I realized the "bug" was due to my nginx conf. There's no problem actually: both CouchDB 2.0 and couchdb-python are working fine.
Really sorry about that,
Adrien
Ah! It can happen... Good to hear you've solved the problem.
At least from version 2.0, it is required to query
host:5984/
(not justhost:5984
) to get the version information:If the trailing slash is omitted, it results in an error: