aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-07-13 00:20:56 +0200
committerLoïc Hoguin <[email protected]>2017-07-13 00:20:56 +0200
commit23fcfe9eead838d75c8e28522ba5e914ce78b117 (patch)
treeb3372ec2e90558bc5ec8560330c073467dfc850e /test
parentddb0c4f3b6385ee2ef85d237498e3450bec9169b (diff)
downloadcowboy-23fcfe9eead838d75c8e28522ba5e914ce78b117.tar.gz
cowboy-23fcfe9eead838d75c8e28522ba5e914ce78b117.tar.bz2
cowboy-23fcfe9eead838d75c8e28522ba5e914ce78b117.zip
Fix more of the older tests
The Cowboy behavior has changed a little and gives more accurate error responses now. And in some cases, successes.
Diffstat (limited to 'test')
-rw-r--r--test/http_SUITE.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/http_SUITE.erl b/test/http_SUITE.erl
index 2141049..5f899e4 100644
--- a/test/http_SUITE.erl
+++ b/test/http_SUITE.erl
@@ -211,13 +211,13 @@ The document has moved
{400, "GET http://proxy/ HTTP/1.1\r\n\r\n"},
{400, "GET / HTTP/1.1\r\nHost: localhost:bad_port\r\n\r\n"},
{400, ["POST /crash/content-length HTTP/1.1\r\nHost: localhost\r\nContent-Length: 5000,5000\r\n\r\n", Huge]},
- {505, ResponsePacket},
+ {400, ResponsePacket},
{408, "GET / HTTP/1.1\r\n"},
{408, "GET / HTTP/1.1\r\nHost: localhost"},
{408, "GET / HTTP/1.1\r\nHost: localhost\r\n"},
{408, "GET / HTTP/1.1\r\nHost: localhost\r\n\r"},
- {414, Huge},
- {400, "GET / HTTP/1.1\r\n" ++ Huge},
+ {closed, Huge},
+ {431, "GET / HTTP/1.1\r\n" ++ Huge},
{505, "GET / HTTP/1.2\r\nHost: localhost\r\n\r\n"},
{closed, ""},
{closed, "\r\n"},
@@ -234,9 +234,9 @@ check_status(Config) ->
Tests = [
{200, "/"},
{200, "/simple"},
- {400, "/static/%2f"},
- {400, "/static/%2e"},
- {400, "/static/%2e%2e"},
+ {404, "/static/%2f"},
+ {403, "/static/%2e"}, %% This routes to /static.
+ {200, "/static/%2e%2e"}, %% This routes to /.
{403, "/static/directory"},
{403, "/static/directory/"},
{403, "/static/unreadable"},