diff options
author | Hans Nilsson <[email protected]> | 2017-11-09 12:35:12 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2017-11-09 13:04:51 +0100 |
commit | becf2f12731bf3bedc7ec0c2e90caa3a0c6b58ee (patch) | |
tree | 5d78c6395cee544db9b3ca250e841ee5248212c5 /lib | |
parent | 2cc46961352aded5c84ecb9bcb32581461dbc047 (diff) | |
download | otp-becf2f12731bf3bedc7ec0c2e90caa3a0c6b58ee.tar.gz otp-becf2f12731bf3bedc7ec0c2e90caa3a0c6b58ee.tar.bz2 otp-becf2f12731bf3bedc7ec0c2e90caa3a0c6b58ee.zip |
ssh: Don't remove trailing WS in Hello msg
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssh/src/ssh_transport.erl | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/ssh/src/ssh_transport.erl b/lib/ssh/src/ssh_transport.erl index 9bebaf2d9b..61a1a57063 100644 --- a/lib/ssh/src/ssh_transport.erl +++ b/lib/ssh/src/ssh_transport.erl @@ -1827,12 +1827,6 @@ same(Algs) -> [{client2server,Algs}, {server2client,Algs}]. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% trim_tail(Str) -> - lists:reverse(trim_head(lists:reverse(Str))). - -trim_head([$\s|Cs]) -> trim_head(Cs); -trim_head([$\t|Cs]) -> trim_head(Cs); -trim_head([$\n|Cs]) -> trim_head(Cs); -trim_head([$\r|Cs]) -> trim_head(Cs); -trim_head(Cs) -> Cs. - - + lists:takewhile(fun(C) -> + C=/=$\r andalso C=/=$\n + end, Str). |