diff options
author | Loïc Hoguin <[email protected]> | 2014-12-20 15:12:23 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-12-20 15:12:23 +0200 |
commit | 3dd7a84f495d8f4af50425a136743f67583248ba (patch) | |
tree | bae6694889b40ea3b72f91a9fe294d646f29b038 /src/cow_http_hd.erl | |
parent | c72c11bc583aec2a4250e78439ed335bcfc552c6 (diff) | |
download | cowlib-3dd7a84f495d8f4af50425a136743f67583248ba.tar.gz cowlib-3dd7a84f495d8f4af50425a136743f67583248ba.tar.bz2 cowlib-3dd7a84f495d8f4af50425a136743f67583248ba.zip |
Speed up the two slowest properties in cow_http_hd
We limit input to 50 items maximum.
Diffstat (limited to 'src/cow_http_hd.erl')
-rw-r--r-- | src/cow_http_hd.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cow_http_hd.erl b/src/cow_http_hd.erl index 9023add..8b39dbe 100644 --- a/src/cow_http_hd.erl +++ b/src/cow_http_hd.erl @@ -284,7 +284,7 @@ accept() -> prop_parse_accept() -> ?FORALL(L, - non_empty(list(accept())), + vector(1, 50, accept()), begin << _, Accept/binary >> = iolist_to_binary([[$,, A] || {_, _, _, _, _, A} <- L]), ResL = parse_accept(Accept), @@ -1689,7 +1689,7 @@ ws_extension() -> prop_parse_sec_websocket_extensions() -> ?FORALL(L, - non_empty(list(ws_extension())), + vector(1, 50, ws_extension()), begin << _, SecWebsocketExtensions/binary >> = iolist_to_binary([[$,, E] || {_, _, E} <- L]), ResL = parse_sec_websocket_extensions(SecWebsocketExtensions), |