diff options
author | Loïc Hoguin <[email protected]> | 2015-01-02 15:05:47 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-01-02 15:05:47 +0100 |
commit | 49d63e6bd880b74220038539ad3503253140314f (patch) | |
tree | 6206a2251153bbf3b701b02b0047731fbe75ca49 /src/cow_http_hd.erl | |
parent | 5b969398406b43dfa27a137a0edf91deb6bf3a11 (diff) | |
download | cowlib-49d63e6bd880b74220038539ad3503253140314f.tar.gz cowlib-49d63e6bd880b74220038539ad3503253140314f.tar.bz2 cowlib-49d63e6bd880b74220038539ad3503253140314f.zip |
Add cow_http_hd:parse_proxy_authenticate/1
From RFC7235.
See cow_http_hd:parse_www_authenticate/1.
Diffstat (limited to 'src/cow_http_hd.erl')
-rw-r--r-- | src/cow_http_hd.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cow_http_hd.erl b/src/cow_http_hd.erl index bbdb0e1..ba640e0 100644 --- a/src/cow_http_hd.erl +++ b/src/cow_http_hd.erl @@ -42,6 +42,7 @@ -export([parse_last_modified/1]). -export([parse_max_forwards/1]). -export([parse_pragma/1]). +-export([parse_proxy_authenticate/1]). -export([parse_proxy_authorization/1]). -export([parse_range/1]). -export([parse_retry_after/1]). @@ -2288,6 +2289,15 @@ parse_max_forwards_error_test_() -> parse_pragma(<<"no-cache">>) -> no_cache; parse_pragma(_) -> cache. +%% @doc Parse the Proxy-Authenticate header. +%% +%% Alias of parse_www_authenticate/1 due to identical syntax. + +-spec parse_proxy_authenticate(binary()) -> [{basic, binary()} + | {bearer | digest | binary(), [{binary(), binary()}]}]. +parse_proxy_authenticate(ProxyAuthenticate) -> + parse_www_authenticate(ProxyAuthenticate). + %% @doc Parse the Proxy-Authorization header. %% %% Alias of parse_authorization/1 due to identical syntax. |