aboutsummaryrefslogtreecommitdiffstats
path: root/test/rfc7230_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-05-18 10:41:31 +0200
committerLoïc Hoguin <[email protected]>2018-05-18 10:41:31 +0200
commit5cb244eb7a1f2ad8654fdb7095a3bca235712cfd (patch)
treeab2e811469bfaa5f60a7cc647d895719fa9b216c /test/rfc7230_SUITE.erl
parent753ba2e36d345f960edc4be486238a684c467574 (diff)
downloadcowboy-5cb244eb7a1f2ad8654fdb7095a3bca235712cfd.tar.gz
cowboy-5cb244eb7a1f2ad8654fdb7095a3bca235712cfd.tar.bz2
cowboy-5cb244eb7a1f2ad8654fdb7095a3bca235712cfd.zip
Remove more old_http_SUITE tests
Diffstat (limited to 'test/rfc7230_SUITE.erl')
-rw-r--r--test/rfc7230_SUITE.erl25
1 files changed, 23 insertions, 2 deletions
diff --git a/test/rfc7230_SUITE.erl b/test/rfc7230_SUITE.erl
index d680d75..e8f2df8 100644
--- a/test/rfc7230_SUITE.erl
+++ b/test/rfc7230_SUITE.erl
@@ -148,8 +148,29 @@ timeout_after_request_line(Config) ->
doc("The time the request (request line and headers) takes to be "
"received by the server must be limited and subject to configuration. "
"A 408 status code must be sent if the request line was received."),
- #{code := 408, client := Client} = do_raw(Config, "GET / HTTP/1.1\r\n"),
- {error, closed} = raw_recv(Client, 0, 6000).
+ #{code := 408, client := Client1} = do_raw(Config, "GET / HTTP/1.1\r\n"),
+ {error, closed} = raw_recv(Client1, 0, 6000).
+
+timeout_after_request_line_host(Config) ->
+ doc("The time the request (request line and headers) takes to be "
+ "received by the server must be limited and subject to configuration. "
+ "A 408 status code must be sent if the request line was received."),
+ #{code := 408, client := Client2} = do_raw(Config, "GET / HTTP/1.1\r\nHost: localhost"),
+ {error, closed} = raw_recv(Client2, 0, 6000).
+
+timeout_after_request_line_host_crlf(Config) ->
+ doc("The time the request (request line and headers) takes to be "
+ "received by the server must be limited and subject to configuration. "
+ "A 408 status code must be sent if the request line was received."),
+ #{code := 408, client := Client3} = do_raw(Config, "GET / HTTP/1.1\r\nHost: localhost\r\n"),
+ {error, closed} = raw_recv(Client3, 0, 6000).
+
+timeout_after_request_line_host_crlfcr(Config) ->
+ doc("The time the request (request line and headers) takes to be "
+ "received by the server must be limited and subject to configuration. "
+ "A 408 status code must be sent if the request line was received."),
+ #{code := 408, client := Client4} = do_raw(Config, "GET / HTTP/1.1\r\nHost: localhost\r\n\r"),
+ {error, closed} = raw_recv(Client4, 0, 6000).
%% @todo Add an HTTP/1.0 test suite.
%An HTTP/1.1 server must understand any valid HTTP/1.0 request,