0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Revert "Use lists:keyreplace/4 instead of lists:keydelete/3 + cons"

This reverts commit cc65a723d7.
This commit is contained in:
Loïc Hoguin 2012-12-23 14:43:44 +01:00
parent 13c28b8f58
commit a3049f7100

View file

@ -544,7 +544,7 @@ meta(Name, Req, Default) ->
%% If the value already exists it will be overwritten.
-spec set_meta(atom(), any(), Req) -> Req when Req::req().
set_meta(Name, Value, Req=#http_req{meta=Meta}) ->
Req#http_req{meta=lists:keyreplace(Name, 1, Meta, {Name, Value})}.
Req#http_req{meta=[{Name, Value}|lists:keydelete(Name, 1, Meta)]}.
%% Request Body API.