diff options
author | Loïc Hoguin <[email protected]> | 2019-11-21 15:21:23 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-11-23 16:29:46 +0100 |
commit | 485d58dfa91b91d98135dc95e5615f421715dae5 (patch) | |
tree | 4bb3ed6568e84844193a8e06039fbbff972cb120 /src/cow_http_hd.erl | |
parent | a6fe0b1f3866430c6392cfb51085c516df64ac94 (diff) | |
download | cowlib-485d58dfa91b91d98135dc95e5615f421715dae5.tar.gz cowlib-485d58dfa91b91d98135dc95e5615f421715dae5.tar.bz2 cowlib-485d58dfa91b91d98135dc95e5615f421715dae5.zip |
Add cow_link implementing RFC8288 (link header)
Diffstat (limited to 'src/cow_http_hd.erl')
-rw-r--r-- | src/cow_http_hd.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cow_http_hd.erl b/src/cow_http_hd.erl index 59bd3bf..cbc9f6b 100644 --- a/src/cow_http_hd.erl +++ b/src/cow_http_hd.erl @@ -65,7 +65,7 @@ -export([parse_if_unmodified_since/1]). % @todo -export([parse_last_event_id/1]). eventsource -export([parse_last_modified/1]). -% @todo -export([parse_link/1]). RFC5988 +-export([parse_link/1]). % @todo -export([parse_location/1]). RFC7231 -export([parse_max_forwards/1]). % @todo -export([parse_memento_datetime/1]). RFC7089 @@ -2178,6 +2178,12 @@ parse_last_modified_test_() -> [{V, fun() -> R = parse_last_modified(V) end} || {V, R} <- Tests]. -endif. +%% @doc Parse the Link header. + +-spec parse_link(binary()) -> [cow_link:link()]. +parse_link(Link) -> + cow_link:parse_link(Link). + %% @doc Parse the Max-Forwards header. -spec parse_max_forwards(binary()) -> non_neg_integer(). |