You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "Sebastian Rothbucher (JIRA)" <ji...@apache.org> on 2015/10/11 18:46:05 UTC
[jira] [Created] (COUCHDB-2853) Etags behave differently on 2.0
cluster interface compared to 1.x / local
Sebastian Rothbucher created COUCHDB-2853:
---------------------------------------------
Summary: Etags behave differently on 2.0 cluster interface compared to 1.x / local
Key: COUCHDB-2853
URL: https://issues.apache.org/jira/browse/COUCHDB-2853
Project: CouchDB
Issue Type: Bug
Security Level: public (Regular issues)
Reporter: Sebastian Rothbucher
when PUTting an attachment for a document we expected the _rev as Etag so far. - which is no more the case. Can be either expected behavior or a bug
var xhr = CouchDB.request("PUT", "/" + db_name + "/bin_doc3/attachment.txt", {
headers:{"Content-Type":"text/plain;charset=utf-8"},
body:bin_data
});
T(xhr.status == 201);
var rev = JSON.parse(xhr.responseText).rev;
// TODO: revisit Etags (missing on doc write)
// TEquals('"' + rev + '"', xhr.getResponseHeader("Etag"));
(taken from the attachments 1.x test run against the 2.0 cluster interface)
Side note: there is just no Etag at all, reproduce e.g. with
curl -X PUT 'http://localhost:15984/somedb/t' -d {} && curl -X PUT 'http://localhost:15984/somedb/t/att.txt?rev=1-967a00dff5e02add41819138abb3284d' -H 'Content-type: text/plain' -d 'heyho' -v
gives:
* upload completely sent off: 5 out of 5 bytes
< HTTP/1.1 201 Created
< Cache-Control: must-revalidate
< Content-Length: 64
< Content-Type: text/plain; charset=utf-8
< Date: Sun, 11 Oct 2015 16:44:00 GMT
< Location: http://localhost:15984/somedb/t/att.txt
< Server: CouchDB/8924e94 (Erlang OTP/17)
< X-Couch-Request-ID: c520388dc6
< X-CouchDB-Body-Time: 0
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)