From 0c402e4f640be1f4cd3b9d45561ee4fa6629f76d Mon Sep 17 00:00:00 2001
From: Thomas Lachmann
Date: Wed, 18 Aug 2010 20:07:40 +0200
Subject: 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.
---
lib/ssl/src/ssl_connection.erl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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.
--
cgit v1.2.3