Small optimization

Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/44bb98f9
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/44bb98f9
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/44bb98f9

Branch: refs/heads/1843-feature-bigcouch
Commit: 44bb98f9ddff39936a6533a51eb09d789b58708a
Parents: eef1250
Author: Dmitry Demeshchuk <[email protected]>
Authored: Wed Nov 13 11:21:01 2013 -0800
Committer: Dmitry Demeshchuk <[email protected]>
Committed: Wed Nov 13 11:21:01 2013 -0800

----------------------------------------------------------------------
 src/mochiweb_util.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/44bb98f9/src/mochiweb_util.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_util.erl b/src/mochiweb_util.erl
index 2690f58..c606767 100644
--- a/src/mochiweb_util.erl
+++ b/src/mochiweb_util.erl
@@ -360,8 +360,8 @@ guess_mime(File) ->
     case filename:basename(File) of
         "crossdomain.xml" ->
             "text/x-cross-domain-policy";
-        _ ->
-            case mochiweb_mime:from_extension(filename:extension(File)) of
+        Name ->
+            case mochiweb_mime:from_extension(filename:extension(Name)) of
                 undefined ->
                     "text/plain";
                 Mime ->

Reply via email to