From 58e040359fa8d175b9eecec49f58e3dd00c78d1e Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Sun, 8 Feb 2009 20:29:51 +0000 Subject: extract method couch_httpd:send_redirect(Req, Path) git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@742158 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd_misc_handlers.erl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/couchdb/couch_httpd_misc_handlers.erl') diff --git a/src/couchdb/couch_httpd_misc_handlers.erl b/src/couchdb/couch_httpd_misc_handlers.erl index 2ba8ef64..71a0e9ae 100644 --- a/src/couchdb/couch_httpd_misc_handlers.erl +++ b/src/couchdb/couch_httpd_misc_handlers.erl @@ -50,8 +50,7 @@ handle_utils_dir_req(#httpd{method='GET'}=Req, DocumentRoot) -> couch_httpd:serve_file(Req, RelativePath, DocumentRoot); {_ActionKey, "", _RelativePath} -> % GET /_utils - Headers = [{"Location", couch_httpd:absolute_uri(Req, "/_utils/")}], - couch_httpd:send_response(Req, 301, Headers, <<>>) + couch_httpd:send_redirect(Req, "/_utils/") end; handle_utils_dir_req(Req, _) -> send_method_not_allowed(Req, "GET,HEAD"). -- cgit v1.2.3