From 55aa4354f44bbda09936d4b1ab12bce660b610d6 Mon Sep 17 00:00:00 2001 From: SisMaker <1713699517@qq.com> Date: Tue, 24 Mar 2020 23:35:49 +0800 Subject: [PATCH] bug fix --- src/httpCli/agHttpProtocol.erl | 2 +- src/httpCli/agMiscUtils.erl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/httpCli/agHttpProtocol.erl b/src/httpCli/agHttpProtocol.erl index 201972b..e494b91 100644 --- a/src/httpCli/agHttpProtocol.erl +++ b/src/httpCli/agHttpProtocol.erl @@ -160,7 +160,7 @@ response(#recvState{stage = header, body = OldBody}, Rn, RnRn, Data, IsHeadMetho end. spellHeaders(Headers) -> - [<> || {Key, Value} <- Headers]. + <<<> || {Key, Value} <- Headers>>. splitHeaders(Data, Rn, RnRn) -> case binary:split(Data, RnRn) of diff --git a/src/httpCli/agMiscUtils.erl b/src/httpCli/agMiscUtils.erl index 6c7445e..19158a2 100644 --- a/src/httpCli/agMiscUtils.erl +++ b/src/httpCli/agMiscUtils.erl @@ -102,6 +102,6 @@ spellQueryPars([]) -> spellQueryPars([{Key, Value}]) -> <<"?", (toBinary(Key))/binary, "=", (toBinary(Value))/binary>>; spellQueryPars([{Key, Value} | Tail]) -> - First = <<"?", (toBinary(Key))/binary, "=", (toBinary(Value))/binary>>, - Tail = [<<"&", (toBinary(OtherKey))/binary, "=", (toBinary(OtherValue))/binary>> || {OtherKey, OtherValue} <- Tail], - <>. + FirstBinary = <<"?", (toBinary(Key))/binary, "=", (toBinary(Value))/binary>>, + TailBinary = <<<<"&", (toBinary(OtherKey))/binary, "=", (toBinary(OtherValue))/binary>> || {OtherKey, OtherValue} <- Tail>>, + <>. \ No newline at end of file