diff options
author | alex <[email protected]> | 2019-04-09 15:35:49 +0200 |
---|---|---|
committer | alex <[email protected]> | 2019-04-09 15:35:49 +0200 |
commit | 58d4a482d710d002acaabd74230922202adbc165 (patch) | |
tree | b8145e5ab32b6f3a6b8a44f2a0845f9f1ee09798 /lib/inets/test | |
parent | 5dacc0bcaa857f52dd25bb93335f38fd5256e343 (diff) | |
download | otp-58d4a482d710d002acaabd74230922202adbc165.tar.gz otp-58d4a482d710d002acaabd74230922202adbc165.tar.bz2 otp-58d4a482d710d002acaabd74230922202adbc165.zip |
inets: httpd_request - honor RFC2616 LF only as header line terminator
Diffstat (limited to 'lib/inets/test')
-rw-r--r-- | lib/inets/test/http_format_SUITE.erl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/inets/test/http_format_SUITE.erl b/lib/inets/test/http_format_SUITE.erl index d6b0e5f9f5..7943983945 100644 --- a/lib/inets/test/http_format_SUITE.erl +++ b/lib/inets/test/http_format_SUITE.erl @@ -414,6 +414,19 @@ http_request(Config) when is_list(Config) -> {max_content_length, ?HTTP_MAX_CONTENT_LENGTH} ]], HttpHead2), + %% If ?CR is is missing RFC2616 section-19.3 + HttpHead3 = ["GET http://www.erlang.org HTTP/1.1", [?LF], + "Accept: text/html", [?LF, ?LF]], + {"GET", + "http://www.erlang.org", + "HTTP/1.1", + {#http_request_h{}, [{"accept","text/html"}]}, <<>>} = + parse(httpd_request, parse, [[{max_header, ?HTTP_MAX_HEADER_SIZE}, + {max_version, ?HTTP_MAX_VERSION_STRING}, + {max_method, ?HTTP_MAX_METHOD_STRING}, + {max_content_length, ?HTTP_MAX_CONTENT_LENGTH} + ]], HttpHead3), + %% Note the following body is not related to the headers above HttpBody = ["<HTML>\n<HEAD>\n<TITLE> dummy </TITLE>\n</HEAD>\n<BODY>\n", "<H1>dummy</H1>\n</BODY>\n</HTML>\n"], |