Remove unused UTF-8 function

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

Branch: refs/heads/import
Commit: f68c115db7364d3eeaaaf86676f1118d1f3c09c4
Parents: a4fc628
Author: Robert Newson <[email protected]>
Authored: Wed Jan 30 16:45:13 2013 +0000
Committer: Robert Newson <[email protected]>
Committed: Wed Mar 6 12:22:38 2013 -0600

----------------------------------------------------------------------
 src/chttpd_db.erl | 27 ---------------------------
 1 file changed, 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/f68c115d/src/chttpd_db.erl
----------------------------------------------------------------------
diff --git a/src/chttpd_db.erl b/src/chttpd_db.erl
index 78667d6..d155232 100644
--- a/src/chttpd_db.erl
+++ b/src/chttpd_db.erl
@@ -1265,33 +1265,6 @@ validate_attachment_name(Name) ->
         false -> throw({bad_request, <<"Attachment name is not UTF-8 
encoded">>})
     end.
 
-%% borrowed from mochijson2:json_bin_is_safe()
-is_valid_utf8(<<>>) ->
-    true;
-is_valid_utf8(<<C, Rest/binary>>) ->
-    case C of
-        $\" ->
-            false;
-        $\\ ->
-            false;
-        $\b ->
-            false;
-        $\f ->
-            false;
-        $\n ->
-            false;
-        $\r ->
-            false;
-        $\t ->
-            false;
-        C when C >= 0, C < $\s; C >= 16#7f, C =< 16#10FFFF ->
-            false;
-        C when C < 16#7f ->
-            is_valid_utf8(Rest);
-        _ ->
-            false
-    end.
-
 -spec monitor_attachments(#att{} | [#att{}]) -> [reference()].
 monitor_attachments(#att{}=Att) ->
     monitor_attachments([Att]);

Reply via email to