aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-12-23 14:43:44 +0100
committerLoïc Hoguin <[email protected]>2012-12-23 14:43:44 +0100
commita3049f7100bb9f3cbaef1db6bf6cdeb750d9e298 (patch)
treeb04d559a12d0ab556f3a4d6ba2b984ff16a5ba9c /src
parent13c28b8f58dc9f0867184e4e50a5b46e08e4d704 (diff)
downloadcowboy-a3049f7100bb9f3cbaef1db6bf6cdeb750d9e298.tar.gz
cowboy-a3049f7100bb9f3cbaef1db6bf6cdeb750d9e298.tar.bz2
cowboy-a3049f7100bb9f3cbaef1db6bf6cdeb750d9e298.zip
Revert "Use lists:keyreplace/4 instead of lists:keydelete/3 + cons"
This reverts commit cc65a723d70bb078b048bab81eeb8a4bd7ed39ce.
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_req.erl2
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.