Browse Source

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

This reverts commit cc65a723d70bb078b048bab81eeb8a4bd7ed39ce.
Loïc Hoguin 12 years ago
parent
commit
a3049f7100
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/cowboy_req.erl

+ 1 - 1
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.