aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-12-31 00:07:42 +0100
committerLoïc Hoguin <[email protected]>2014-12-31 00:07:42 +0100
commit2548432042a97c4e174bb956e542b54203c46d3b (patch)
treec50bbf46fc75acaf3902d86a16f5dccf62b611b7 /include
parent9da51ee5f9392cdc61a134b0266c5a26320923ab (diff)
downloadcowlib-2548432042a97c4e174bb956e542b54203c46d3b.tar.gz
cowlib-2548432042a97c4e174bb956e542b54203c46d3b.tar.bz2
cowlib-2548432042a97c4e174bb956e542b54203c46d3b.zip
Add cow_http_hd:parse_authorization/1
Supports Basic, Digest and Bearer schemes only. From RFC7235, RFC2617 and RFC6750.
Diffstat (limited to 'include')
-rw-r--r--include/cow_inline.hrl14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/cow_inline.hrl b/include/cow_inline.hrl
index 3abb018..758459e 100644
--- a/include/cow_inline.hrl
+++ b/include/cow_inline.hrl
@@ -60,6 +60,13 @@
C =:= $A orelse C =:= $B orelse C =:= $C orelse
C =:= $D orelse C =:= $E orelse C =:= $F).
+%% IS_LHEX(Character)
+
+-define(IS_LHEX(C),
+ ?IS_DIGIT(C) orelse
+ C =:= $a orelse C =:= $b orelse C =:= $c orelse
+ C =:= $d orelse C =:= $e orelse C =:= $f).
+
%% IS_TOKEN(Character)
-define(IS_TOKEN(C),
@@ -69,6 +76,13 @@
orelse C =:= $^ orelse C =:= $_ orelse C =:= $` orelse C =:= $| orelse C =:= $~
).
+%% IS_TOKEN68(Character)
+
+-define(IS_TOKEN68(C),
+ ?IS_ALPHA(C) orelse ?IS_DIGIT(C) orelse
+ C =:= $- orelse C =:= $. orelse C =:= $_ orelse
+ C =:= $~ orelse C =:= $+ orelse C =:= $/).
+
%% IS_URI_UNRESERVED(Character)
-define(IS_URI_UNRESERVED(C),