diff options
author | Zandra <[email protected]> | 2015-11-20 10:22:56 +0100 |
---|---|---|
committer | Zandra <[email protected]> | 2015-11-20 10:22:56 +0100 |
commit | 48f72c4967b3fd39b7b63898f4b24a72186b6dc8 (patch) | |
tree | ee0f8b30418bb85bf2a4c448aa6a5ecefc31297d /lib/inets/test/httpc_SUITE.erl | |
parent | b190a53c020def1e72e49e30c66ccae822208eee (diff) | |
parent | 94ea0c1218cfb8480d37775f0c2a82452c897360 (diff) | |
download | otp-48f72c4967b3fd39b7b63898f4b24a72186b6dc8.tar.gz otp-48f72c4967b3fd39b7b63898f4b24a72186b6dc8.tar.bz2 otp-48f72c4967b3fd39b7b63898f4b24a72186b6dc8.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/inets/test/httpc_SUITE.erl')
-rw-r--r-- | lib/inets/test/httpc_SUITE.erl | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl index 989563cdbc..c6c59ab1af 100644 --- a/lib/inets/test/httpc_SUITE.erl +++ b/lib/inets/test/httpc_SUITE.erl @@ -106,6 +106,7 @@ only_simulated() -> bad_response, internal_server_error, invalid_http, + invalid_chunk_size, headers_dummy, headers_with_obs_fold, empty_response_header, @@ -765,6 +766,22 @@ invalid_http(Config) when is_list(Config) -> ct:print("Parse error: ~p ~n", [Reason]). %%------------------------------------------------------------------------- + +invalid_chunk_size(doc) -> + ["Test parse error of HTTP chunk size"]; +invalid_chunk_size(suite) -> + []; +invalid_chunk_size(Config) when is_list(Config) -> + + URL = url(group_name(Config), "/invalid_chunk_size.html", Config), + + {error, {chunk_size, _} = Reason} = + httpc:request(get, {URL, []}, [], []), + + ct:print("Parse error: ~p ~n", [Reason]). + +%%------------------------------------------------------------------------- + emulate_lower_versions(doc) -> [{doc, "Perform request as 0.9 and 1.0 clients."}]; emulate_lower_versions(Config) when is_list(Config) -> @@ -1876,6 +1893,10 @@ handle_uri(_,"/invalid_http.html",_,_,_,_) -> "HTTP/1.1 301\r\nDate:Sun, 09 Dec 2007 13:04:18 GMT\r\n" ++ "Transfer-Encoding:chunked\r\n\r\n"; +handle_uri(_,"/invalid_chunk_size.html",_,_,_,_) -> + "HTTP/1.1 200 ok\r\n" ++ + "Transfer-Encoding:chunked\r\n\r\nåäö\r\n"; + handle_uri(_,"/missing_reason_phrase.html",_,_,_,_) -> "HTTP/1.1 200\r\n" ++ "Content-Length: 32\r\n\r\n" |