diff options
author | Loïc Hoguin <[email protected]> | 2014-12-20 02:06:07 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-12-20 02:06:07 +0200 |
commit | 1f8a70d0860862a8b5d5819f5d9e0240abdbe69e (patch) | |
tree | eb9dd6658a0d3222d845aa5ac82fb3d66d5b87e1 /src/cow_spdy.erl | |
parent | a2376de4de4c01ac8cdf23983b0eb450ddc49a8b (diff) | |
download | cowlib-1f8a70d0860862a8b5d5819f5d9e0240abdbe69e.tar.gz cowlib-1f8a70d0860862a8b5d5819f5d9e0240abdbe69e.tar.bz2 cowlib-1f8a70d0860862a8b5d5819f5d9e0240abdbe69e.zip |
Add cow_http_hd:parse_content_language/1
From RFC7231 and RFC5646.
The ABNF for language tags is terrible. It makes parsing efficiently
a big challenge and the result is this huge ugly set of functions.
Thankfully triq allows us to make sure the implementation is correct.
A large number of examples has also been extracted from both RFCs.
The various ?IS_ALPHA(C), ?IS_TOKEN(C) and so on have received a
change: they now use 'orelse' instead of ';'. This is because in
this new code we need to check more than one character per clause.
The compilation time for this module increased dramatically.
Apparently happens because the guards are too big. Using ranges
($a =< C =< $z) instead of the current solution makes compilation
much faster, but the function executes twice as slow which is not
acceptable.
Diffstat (limited to 'src/cow_spdy.erl')
0 files changed, 0 insertions, 0 deletions