aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test
diff options
context:
space:
mode:
authorJohan Sommerfeld <[email protected]>2016-10-06 16:57:45 +0200
committerJohan Sommerfeld <[email protected]>2016-10-06 16:57:45 +0200
commit6aba6239e8ab54b8db7ad0b76b1a8870af682d32 (patch)
tree82ddc7a210ba6618d84b24d60433f7261c353751 /lib/inets/test
parent05be21eb0ad09fcdd63d955ed1d5b50ed34af925 (diff)
downloadotp-6aba6239e8ab54b8db7ad0b76b1a8870af682d32.tar.gz
otp-6aba6239e8ab54b8db7ad0b76b1a8870af682d32.tar.bz2
otp-6aba6239e8ab54b8db7ad0b76b1a8870af682d32.zip
Fix inets ftp bug related to multiple lines resp
Fixes a bug that makes the ftp client end up in bad state if there is a multi line response from the server and the response number is in the message being sent.
Diffstat (limited to 'lib/inets/test')
-rw-r--r--lib/inets/test/ftp_format_SUITE.erl13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/inets/test/ftp_format_SUITE.erl b/lib/inets/test/ftp_format_SUITE.erl
index a33b31f46f..95d594a44b 100644
--- a/lib/inets/test/ftp_format_SUITE.erl
+++ b/lib/inets/test/ftp_format_SUITE.erl
@@ -38,8 +38,8 @@ all() ->
groups() ->
[{ftp_response, [],
[ftp_150, ftp_200, ftp_220, ftp_226, ftp_257, ftp_331,
- ftp_425, ftp_other_status_codes, ftp_multiple_lines,
- ftp_multipel_ctrl_messages]}].
+ ftp_425, ftp_other_status_codes, ftp_multiple_lines_status_in_msg,
+ ftp_multiple_lines, ftp_multipel_ctrl_messages]}].
init_per_suite(Config) ->
Config.
@@ -141,6 +141,15 @@ ftp_425(Config) when is_list(Config) ->
{trans_neg_compl, _} = ftp_response:interpret(Msg),
ok.
+ftp_multiple_lines_status_in_msg() ->
+ [{doc, "check that multiple lines gets parsed correct, even if we have "
+ " the status code within the msg being sent"}].
+ftp_multiple_lines_status_in_msg(Config) when is_list(Config) ->
+ ML = "230-User usr-230 is logged in\r\n" ++
+ "230 OK. Current directory is /\r\n",
+ {ok, ML, <<>>} = ftp_response:parse_lines(list_to_binary(ML), [], start),
+ ok.
+
ftp_multiple_lines() ->
[{doc, "Especially check multiple lines devided in significant places"}].
ftp_multiple_lines(Config) when is_list(Config) ->