From 642a8f73c9fef1fb8ce524169d619a80a6797ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 11 Oct 2012 20:44:53 +0200 Subject: Fix Vary header, was wrongly named Variances previously --- examples/rest_hello_world/README.md | 6 +++--- src/cowboy_rest.erl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/rest_hello_world/README.md b/examples/rest_hello_world/README.md index c0b8c8d..7072e5e 100644 --- a/examples/rest_hello_world/README.md +++ b/examples/rest_hello_world/README.md @@ -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 @@ -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!"} ``` @@ -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! ``` diff --git a/src/cowboy_rest.erl b/src/cowboy_rest.erl index 2f9faa8..c0decbd 100644 --- a/src/cowboy_rest.erl +++ b/src/cowboy_rest.erl @@ -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. -- cgit v1.2.3