summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_httpd_misc_handlers.erl
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2009-09-09 16:53:49 +0000
committerAdam Kocoloski <kocolosk@apache.org>2009-09-09 16:53:49 +0000
commit9b78e1555d73c888fedaa0b9d256abaeaadbe41a (patch)
tree921f620daaeb7116e5511db830e5ecb6d0498f98 /src/couchdb/couch_httpd_misc_handlers.erl
parent85d1cbfc79eb0a04ec7f16624d6290920b4355ac (diff)
choice of uuid algos for better insert perf. Closes COUCHDB-465. Thanks rnewson, bitdiddle
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@813051 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_misc_handlers.erl')
-rw-r--r--src/couchdb/couch_httpd_misc_handlers.erl7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/couchdb/couch_httpd_misc_handlers.erl b/src/couchdb/couch_httpd_misc_handlers.erl
index c3c5b37a..7f5573ff 100644
--- a/src/couchdb/couch_httpd_misc_handlers.erl
+++ b/src/couchdb/couch_httpd_misc_handlers.erl
@@ -108,11 +108,10 @@ handle_uuids_req(#httpd{method='GET'}=Req) ->
Count = list_to_integer(couch_httpd:qs_value(Req, "count", "1")),
CacheBustingHeaders = [{"Date", httpd_util:rfc1123_date()},
{"Cache-Control", "no-cache"},
- {"Expires", "Fri, 01 Jan 1990 00:00:00 GMT"}, % Past date, ON PURPOSE!
+ % Past date, ON PURPOSE!
+ {"Expires", "Fri, 01 Jan 1990 00:00:00 GMT"},
{"Pragma", "no-cache"}],
- % generate the uuids
- UUIDs = [ couch_util:new_uuid() || _ <- lists:seq(1,Count)],
- % send a JSON response
+ UUIDs = [couch_uuids:new() || _ <- lists:seq(1, Count)],
send_json(Req, 200, CacheBustingHeaders, {[{<<"uuids">>, UUIDs}]});
handle_uuids_req(Req) ->
send_method_not_allowed(Req, "GET").