summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2010-08-06 16:45:55 +0000
committerRobert Newson <rnewson@apache.org>2010-08-06 16:45:55 +0000
commit809c8a543ab2441622730def80b9138520a95f2a (patch)
tree6fbc910e96b3cfc60439e933b27d93fae86355e2 /src
parent6d79aad233194cf16f38e7ea274af8a36325cfe6 (diff)
add Etag header for standalone attachment PUT.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@983045 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_httpd_db.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl
index e8b3f6b0..79ca2339 100644
--- a/src/couchdb/couch_httpd_db.erl
+++ b/src/couchdb/couch_httpd_db.erl
@@ -1022,7 +1022,8 @@ db_attachment_req(#httpd{method=Method,mochi_req=MochiReq}=Req, Db, DocId, FileN
'DELETE' ->
{200, []};
_ ->
- {201, [{"Location", absolute_uri(Req, "/" ++
+ {201, [{"Etag", "\"" ++ ?b2l(couch_doc:rev_to_str(UpdatedRev)) ++ "\""},
+ {"Location", absolute_uri(Req, "/" ++
binary_to_list(DbName) ++ "/" ++
binary_to_list(DocId) ++ "/" ++
binary_to_list(FileName)