Sfoglia il codice sorgente

bug fix

erlArango_v1
SisMaker 5 anni fa
parent
commit
55aa4354f4
2 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. +1
    -1
      src/httpCli/agHttpProtocol.erl
  2. +3
    -3
      src/httpCli/agMiscUtils.erl

+ 1
- 1
src/httpCli/agHttpProtocol.erl Vedi File

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

+ 3
- 3
src/httpCli/agMiscUtils.erl Vedi File

@ -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],
<<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>>.

Caricamento…
Annulla
Salva