diff options
Diffstat (limited to 'src/cowboy_req.erl')
-rw-r--r-- | src/cowboy_req.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl index 7f3b566..da9d2c0 100644 --- a/src/cowboy_req.erl +++ b/src/cowboy_req.erl @@ -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. |