summaryrefslogtreecommitdiff
path: root/src/couchdb
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2010-08-06 16:54:38 +0000
committerRobert Newson <rnewson@apache.org>2010-08-06 16:54:38 +0000
commitd67957c7d609ed9956c439af739da9569d4478fa (patch)
treeab64e8d0a85e1601af4a38ed782e0ece029fea47 /src/couchdb
parentde550505a42414ddc6b9929ebbd6e14140ec269e (diff)
add Etag header for standalone attachment PUT.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@983051 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-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 b8d3157e..f6c646ed 100644
--- a/src/couchdb/couch_httpd_db.erl
+++ b/src/couchdb/couch_httpd_db.erl
@@ -1025,7 +1025,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)