From d67957c7d609ed9956c439af739da9569d4478fa Mon Sep 17 00:00:00 2001 From: Robert Newson Date: Fri, 6 Aug 2010 16:54:38 +0000 Subject: 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 --- src/couchdb/couch_httpd_db.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/couchdb/couch_httpd_db.erl') 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) -- cgit v1.2.3