diff options
author | Damien F. Katz <damien@apache.org> | 2008-04-20 22:27:11 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2008-04-20 22:27:11 +0000 |
commit | 7cbf6068b8214a89b75e3aa26bdb10d22e97ab90 (patch) | |
tree | b9fe23fd3c699fd188fb29cc966864e7c730f9b3 /src/couchdb/couch_httpd.erl | |
parent | fb5b6bbc5aa941478d700e8fb3011c2a24c4d2d4 (diff) |
Change uuid generaion to rely on crypto. Started crypto and inets application in startscript, and also couch_server_up. Fix for regression caused by accidental check-in of disabled etags.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@649988 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd.erl')
-rw-r--r-- | src/couchdb/couch_httpd.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl index 31bdd143..9351dc89 100644 --- a/src/couchdb/couch_httpd.erl +++ b/src/couchdb/couch_httpd.erl @@ -437,7 +437,7 @@ handle_doc_request(Req, 'GET', _DbName, Db, DocId) -> JsonDoc = couch_doc:to_json_obj(Doc, Options), AdditionalHeaders = case Doc#doc.meta of - [] -> [{"XEtag", Etag}]; % output etag when we have no meta + [] -> [{"Etag", Etag}]; % output etag when we have no meta _ -> [] end, send_json(Req, 200, AdditionalHeaders, JsonDoc); @@ -504,7 +504,7 @@ handle_doc_request(Req, 'PUT', _DbName, Db, DocId) -> Doc = couch_doc:from_json_obj(Json), {ok, NewRev} = couch_db:update_doc(Db, Doc#doc{id=DocId, revs=Revs}, []), - send_json(Req, 201, [{"XEtag", "\"" ++ NewRev ++ "\""}], {obj, [ + send_json(Req, 201, [{"Etag", "\"" ++ NewRev ++ "\""}], {obj, [ {ok, true}, {id, DocId}, {rev, NewRev} @@ -797,9 +797,9 @@ error_to_json0(Error) -> send_error(Req, {method_not_allowed, Methods}) -> {ok, Req:respond({405, [{"Allow", Methods}], <<>>})}; send_error(Req, {modified, Etag}) -> - {ok, Req:respond({412, [{"XEtag", Etag}], <<>>})}; + {ok, Req:respond({412, [{"Etag", Etag}], <<>>})}; send_error(Req, {not_modified, Etag}) -> - {ok, Req:respond({304, [{"XEtag", Etag}], <<>>})}; + {ok, Req:respond({304, [{"Etag", Etag}], <<>>})}; send_error(Req, Error) -> {Code, Json} = error_to_json(Error), ?LOG_INFO("HTTP Error (code ~w): ~p", [Code, Error]), |