aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-12-12 11:41:47 +0100
committerIngela Anderton Andin <[email protected]>2016-12-20 12:28:35 +0100
commit7aa231ee939df914473c44e07ab1c74041c8f589 (patch)
tree38962c5a923e756374187eae24458563adddcb1f /lib/inets/src/http_client
parent1715b9284643150da0f3ea43df42df1a4a90e144 (diff)
downloadotp-7aa231ee939df914473c44e07ab1c74041c8f589.tar.gz
otp-7aa231ee939df914473c44e07ab1c74041c8f589.tar.bz2
otp-7aa231ee939df914473c44e07ab1c74041c8f589.zip
inets: httpc - Chunk size decoding could fail
Correct chunk decoding by adding missing argument to match. The symptom was that chunk decoding sometimes failed depending on stream data arrival timing.
Diffstat (limited to 'lib/inets/src/http_client')
-rw-r--r--lib/inets/src/http_client/httpc_handler.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl
index 2e7df8e424..bb500dbb46 100644
--- a/lib/inets/src/http_client/httpc_handler.erl
+++ b/lib/inets/src/http_client/httpc_handler.erl
@@ -493,7 +493,7 @@ handle_info({Proto, _Socket, Data},
{noreply, NewState#state{mfa = NewMFA,
request = NewRequest}};
{Module, decode_size,
- [TotalChunk, HexList,
+ [TotalChunk, HexList, AccHeaderSize,
{MaxBodySize, BodySoFar, AccLength, MaxHeaderSize}]}
when BodySoFar =/= <<>> ->
?hcrd("data processed - decode_size", []),
@@ -503,7 +503,7 @@ handle_info({Proto, _Socket, Data},
{_, NewBody, NewRequest} = stream(BodySoFar, Request, Code),
NewState = next_body_chunk(State, Code),
NewMFA = {Module, decode_size,
- [TotalChunk, HexList,
+ [TotalChunk, HexList, AccHeaderSize,
{MaxBodySize, NewBody, AccLength, MaxHeaderSize}]},
{noreply, NewState#state{mfa = NewMFA,
request = NewRequest}};