aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lachmann <[email protected]>2010-08-18 20:07:40 +0200
committerIngela Anderton Andin <[email protected]>2010-08-24 11:51:02 +0200
commit0c402e4f640be1f4cd3b9d45561ee4fa6629f76d (patch)
tree5e4f847658e9612bef0fa8bc28c28cf5acd8aa0e
parentf2b1a0749f293f12b3be7d573b4fa8dbfcfdb932 (diff)
downloadotp-0c402e4f640be1f4cd3b9d45561ee4fa6629f76d.tar.gz
otp-0c402e4f640be1f4cd3b9d45561ee4fa6629f76d.tar.bz2
otp-0c402e4f640be1f4cd3b9d45561ee4fa6629f76d.zip
Correct behaviour if {packet, line} and mode list are given
This corrects the returned data to be in list format, not binary if both {packet, line} and list are set as option.
-rw-r--r--lib/ssl/src/ssl_connection.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl
index 1cf7708743..a2ecd91552 100644
--- a/lib/ssl/src/ssl_connection.erl
+++ b/lib/ssl/src/ssl_connection.erl
@@ -1739,7 +1739,8 @@ format_packet_error(#socket_options{active = _, mode = Mode}, Data) ->
format_reply(binary, _, N, Data) when N > 0 -> % Header mode
header(N, Data);
format_reply(binary, _, _, Data) -> Data;
-format_reply(list, Packet, _, Data) when is_integer(Packet); Packet == raw ->
+format_reply(list, Packet, _, Data)
+ when is_integer(Packet); Packet == raw; Packet == line ->
binary_to_list(Data);
format_reply(list, _,_, Data) ->
Data.