summaryrefslogtreecommitdiff
path: root/src/couchdb
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2009-09-30 23:31:48 +0000
committerJohn Christopher Anderson <jchris@apache.org>2009-09-30 23:31:48 +0000
commit6521c6ba57db9cd5c6ddb8fd1641b8c936008cb8 (patch)
treec2a1d3c8ff6eb6846b6ad8db7d3d41208f48b2c8 /src/couchdb
parent3c32073065286f57835323a7f97a3958a8021dec (diff)
_uuid ETags were coming out as random binary noise. fixes this so they are proper strings. Needs backporting to 0.10.x.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@820495 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-rw-r--r--src/couchdb/couch_httpd_misc_handlers.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd_misc_handlers.erl b/src/couchdb/couch_httpd_misc_handlers.erl
index 24eaa82e..7e2d9ea2 100644
--- a/src/couchdb/couch_httpd_misc_handlers.erl
+++ b/src/couchdb/couch_httpd_misc_handlers.erl
@@ -107,14 +107,15 @@ handle_restart_req(Req) ->
handle_uuids_req(#httpd{method='GET'}=Req) ->
Count = list_to_integer(couch_httpd:qs_value(Req, "count", "1")),
UUIDs = [couch_uuids:new() || _ <- lists:seq(1, Count)],
- couch_httpd:etag_respond(Req, erlang:md5(UUIDs), fun() ->
+ Etag = couch_httpd:make_etag(UUIDs),
+ couch_httpd:etag_respond(Req, Etag, fun() ->
CacheBustingHeaders = [
{"Date", httpd_util:rfc1123_date()},
{"Cache-Control", "no-cache"},
% Past date, ON PURPOSE!
{"Expires", "Fri, 01 Jan 1990 00:00:00 GMT"},
{"Pragma", "no-cache"},
- {"ETag", erlang:md5(UUIDs)}
+ {"ETag", Etag}
],
send_json(Req, 200, CacheBustingHeaders, {[{<<"uuids">>, UUIDs}]})
end);