From 9171a65ad9b59a80505bc67f4574e6902d1de5e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C6=A1n=20Tr=E1=BA=A7n-Nguy=E1=BB=85n?= Date: Sun, 18 Feb 2024 17:25:21 -0600 Subject: [PATCH] fix(client): last CRLF is part of multi-line --- src/gen_nntp.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gen_nntp.erl b/src/gen_nntp.erl index 6450e7d..171c960 100644 --- a/src/gen_nntp.erl +++ b/src/gen_nntp.erl @@ -847,7 +847,7 @@ multiline(Socket, {ok, Acc}) -> case gen_tcp:recv(Socket, 0, 1000) of % End of the multi-line response. {ok, <<".\r\n">>} -> - {ok, re:replace(Acc, "^\\s+|\\s+$", "", [{return, binary}, global])}; + {ok, Acc}; {ok, Line} when is_binary(Line) -> multiline(Socket, {ok, <>}); {error, Reason} ->