aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http.erl
diff options
context:
space:
mode:
authorMatthias Endler <[email protected]>2013-11-26 10:05:54 +0100
committerMatthias Endler <[email protected]>2013-11-26 10:19:57 +0100
commitb2511f15a0999c77950f4eb3985c1b76ba03f766 (patch)
treebcb8bc5fe2de93d73c764324c4a33e59b87ad86b /src/cowboy_http.erl
parentdf818625545d565b8b76fbc445063a4822114b93 (diff)
downloadcowboy-b2511f15a0999c77950f4eb3985c1b76ba03f766.tar.gz
cowboy-b2511f15a0999c77950f4eb3985c1b76ba03f766.tar.bz2
cowboy-b2511f15a0999c77950f4eb3985c1b76ba03f766.zip
Fix tohexu/1 and tohexl/1
tohexu(16) or tohexl(16) will now crash, instead of evaluating to $G or $g.
Diffstat (limited to 'src/cowboy_http.erl')
-rw-r--r--src/cowboy_http.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl
index ac4a30f..499173c 100644
--- a/src/cowboy_http.erl
+++ b/src/cowboy_http.erl
@@ -1030,11 +1030,11 @@ urlencode(<<>>, Acc, _Plus, _Upper) ->
-spec tohexu(byte()) -> byte().
tohexu(C) when C < 10 -> $0 + C;
-tohexu(C) when C < 17 -> $A + C - 10.
+tohexu(C) when C < 16 -> $A + C - 10.
-spec tohexl(byte()) -> byte().
tohexl(C) when C < 10 -> $0 + C;
-tohexl(C) when C < 17 -> $a + C - 10.
+tohexl(C) when C < 16 -> $a + C - 10.
%% Tests.