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:
parent
13c28b8f58
commit
a3049f7100
1 changed files with 1 additions and 1 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue