Skip to content

Commit

Permalink
Fix Vary header, was wrongly named Variances previously
Browse files Browse the repository at this point in the history
  • Loading branch information
essen committed Oct 11, 2012
1 parent e128e93 commit 642a8f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/rest_hello_world/README.md
Expand Up @@ -28,7 +28,7 @@ server: Cowboy
date: Fri, 28 Sep 2012 04:15:52 GMT
content-length: 136
Content-Type: text/html
Variances: Accept
Vary: Accept

<html>
<head>
Expand All @@ -51,7 +51,7 @@ server: Cowboy
date: Fri, 28 Sep 2012 04:16:46 GMT
content-length: 24
Content-Type: application/json
Variances: Accept
Vary: Accept

{"rest": "Hello World!"}
```
Expand All @@ -66,7 +66,7 @@ server: Cowboy
date: Fri, 28 Sep 2012 04:18:35 GMT
content-length: 25
Content-Type: text/plain
Variances: Accept
Vary: Accept

REST Hello World as text!
```
Expand Down
2 changes: 1 addition & 1 deletion src/cowboy_rest.erl
Expand Up @@ -470,7 +470,7 @@ variances(Req, State=#state{content_types_p=CTP,
resource_exists(Req3, State2);
[[<<", ">>, H]|Variances5] ->
Req4 = cowboy_req:set_resp_header(
<<"Variances">>, [H|Variances5], Req3),
<<"Vary">>, [H|Variances5], Req3),
resource_exists(Req4, State2)
end.

Expand Down

0 comments on commit 642a8f7

Please sign in to comment.