Browse Source

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.
Loïc Hoguin 8 years ago
parent
commit
23fcfe9eea
1 changed files with 6 additions and 6 deletions
  1. 6 6
      test/http_SUITE.erl

+ 6 - 6
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://proxy/ HTTP/1.1\r\n\r\n"},
 		{400, "GET / HTTP/1.1\r\nHost: localhost:bad_port\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]},
 		{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\n"},
 		{408, "GET / HTTP/1.1\r\nHost: localhost"},
 		{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"},
 		{408, "GET / HTTP/1.1\r\nHost: localhost\r\n\r"},
 		{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"},
 		{505, "GET / HTTP/1.2\r\nHost: localhost\r\n\r\n"},
 		{closed, ""},
 		{closed, ""},
 		{closed, "\r\n"},
 		{closed, "\r\n"},
@@ -234,9 +234,9 @@ check_status(Config) ->
 	Tests = [
 	Tests = [
 		{200, "/"},
 		{200, "/"},
 		{200, "/simple"},
 		{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/directory/"},
 		{403, "/static/directory/"},
 		{403, "/static/unreadable"},
 		{403, "/static/unreadable"},