From 7f1247040c5348f6a3f6e2d999cc5dec9fec6a6f Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Fri, 31 Oct 2008 21:46:34 +0000 Subject: couchdb once again serves favicon.ico git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@709578 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd_misc_handlers.erl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/couchdb/couch_httpd_misc_handlers.erl b/src/couchdb/couch_httpd_misc_handlers.erl index 2d2434e1..bcfe17c4 100644 --- a/src/couchdb/couch_httpd_misc_handlers.erl +++ b/src/couchdb/couch_httpd_misc_handlers.erl @@ -12,7 +12,7 @@ -module(couch_httpd_misc_handlers). --export([handle_welcome_req/2,handle_utils_dir_req/2,handle_all_dbs_req/1, +-export([handle_welcome_req/2,handle_favicon_req/2,handle_utils_dir_req/2,handle_all_dbs_req/1, handle_replicate_req/1,handle_restart_req/1,handle_uuids_req/1, handle_config_req/1]). @@ -36,7 +36,11 @@ handle_welcome_req(#httpd{method='GET'}=Req, WelcomeMessage) -> handle_welcome_req(Req, _) -> send_method_not_allowed(Req, "GET,HEAD"). - +handle_favicon_req(#httpd{method='GET'}=Req, DocumentRoot) -> + couch_httpd:serve_file(Req, "favicon.ico", DocumentRoot); +handle_favicon_req(Req, _) -> + send_method_not_allowed(Req, "GET,HEAD"). + handle_utils_dir_req(#httpd{method='GET'}=Req, DocumentRoot) -> "/" ++ UrlPath = couch_httpd:path(Req), case couch_httpd:partition(UrlPath) of -- cgit v1.2.3