mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Fix Vary header, was wrongly named Variances previously
This commit is contained in:
parent
e128e935af
commit
642a8f73c9
2 changed files with 4 additions and 4 deletions
|
@ -28,7 +28,7 @@ server: Cowboy
|
||||||
date: Fri, 28 Sep 2012 04:15:52 GMT
|
date: Fri, 28 Sep 2012 04:15:52 GMT
|
||||||
content-length: 136
|
content-length: 136
|
||||||
Content-Type: text/html
|
Content-Type: text/html
|
||||||
Variances: Accept
|
Vary: Accept
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
@ -51,7 +51,7 @@ server: Cowboy
|
||||||
date: Fri, 28 Sep 2012 04:16:46 GMT
|
date: Fri, 28 Sep 2012 04:16:46 GMT
|
||||||
content-length: 24
|
content-length: 24
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Variances: Accept
|
Vary: Accept
|
||||||
|
|
||||||
{"rest": "Hello World!"}
|
{"rest": "Hello World!"}
|
||||||
```
|
```
|
||||||
|
@ -66,7 +66,7 @@ server: Cowboy
|
||||||
date: Fri, 28 Sep 2012 04:18:35 GMT
|
date: Fri, 28 Sep 2012 04:18:35 GMT
|
||||||
content-length: 25
|
content-length: 25
|
||||||
Content-Type: text/plain
|
Content-Type: text/plain
|
||||||
Variances: Accept
|
Vary: Accept
|
||||||
|
|
||||||
REST Hello World as text!
|
REST Hello World as text!
|
||||||
```
|
```
|
||||||
|
|
|
@ -470,7 +470,7 @@ variances(Req, State=#state{content_types_p=CTP,
|
||||||
resource_exists(Req3, State2);
|
resource_exists(Req3, State2);
|
||||||
[[<<", ">>, H]|Variances5] ->
|
[[<<", ">>, H]|Variances5] ->
|
||||||
Req4 = cowboy_req:set_resp_header(
|
Req4 = cowboy_req:set_resp_header(
|
||||||
<<"Variances">>, [H|Variances5], Req3),
|
<<"Vary">>, [H|Variances5], Req3),
|
||||||
resource_exists(Req4, State2)
|
resource_exists(Req4, State2)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue