瀏覽代碼

bug fix

erlArango_v1
SisMaker 5 年之前
父節點
當前提交
55aa4354f4
共有 2 個檔案被更改,包括 4 行新增4 行删除
  1. +1
    -1
      src/httpCli/agHttpProtocol.erl
  2. +3
    -3
      src/httpCli/agMiscUtils.erl

+ 1
- 1
src/httpCli/agHttpProtocol.erl 查看文件

@ -160,7 +160,7 @@ response(#recvState{stage = header, body = OldBody}, Rn, RnRn, Data, IsHeadMetho
end. end.
spellHeaders(Headers) -> spellHeaders(Headers) ->
[<<Key/binary, ": ", Value/binary, "\r\n">> || {Key, Value} <- Headers].
<<<<Key/binary, ": ", Value/binary, "\r\n">> || {Key, Value} <- Headers>>.
splitHeaders(Data, Rn, RnRn) -> splitHeaders(Data, Rn, RnRn) ->
case binary:split(Data, RnRn) of case binary:split(Data, RnRn) of

+ 3
- 3
src/httpCli/agMiscUtils.erl 查看文件

@ -102,6 +102,6 @@ spellQueryPars([]) ->
spellQueryPars([{Key, Value}]) -> spellQueryPars([{Key, Value}]) ->
<<"?", (toBinary(Key))/binary, "=", (toBinary(Value))/binary>>; <<"?", (toBinary(Key))/binary, "=", (toBinary(Value))/binary>>;
spellQueryPars([{Key, Value} | Tail]) -> spellQueryPars([{Key, Value} | Tail]) ->
First = <<"?", (toBinary(Key))/binary, "=", (toBinary(Value))/binary>>,
Tail = [<<"&", (toBinary(OtherKey))/binary, "=", (toBinary(OtherValue))/binary>> || {OtherKey, OtherValue} <- Tail],
<<First/binary, Tail/binary>>.
FirstBinary = <<"?", (toBinary(Key))/binary, "=", (toBinary(Value))/binary>>,
TailBinary = <<<<"&", (toBinary(OtherKey))/binary, "=", (toBinary(OtherValue))/binary>> || {OtherKey, OtherValue} <- Tail>>,
<<FirstBinary/binary, TailBinary/binary>>.

Loading…
取消
儲存