azure-sdk-for-cpp/sdk/core
Victor Vazquez 3f67c21ba8
Fix the end of chunk parsing (#1403)
While parsing a chunked response with the curl HTTP transport adapter, there was an issue for parsing the last chunk.
As soon as the end of chunk data was found ("0") the adapter was returning and setting the session state as if the transfer was completed.
However, the HTTP RFC for chunked data (https://tools.ietf.org/html/rfc7230#section-4.1) defines that there is a CRLF after the last chunk info.

By not reading the last CRLF from the response, and if the connection was re-used right after reading the last chunk made the next request to get the `CRLF` as the first part for the response, making the parser crash.

The fix in this PR makes sure that when the last chunk is found and parsed, the CRLF is also parsed from the response to make sure that the response data transfer has completed

fixes: #1396
2021-01-20 05:57:45 +00:00
..
azure-core Fix the end of chunk parsing (#1403) 2021-01-20 05:57:45 +00:00
performance-stress Do not use ${TARGET_NAME} unless necessary (#1094) 2020-12-07 20:20:06 -08:00
ci.yml Automate publishing to vcpkg (#1283) 2021-01-13 14:35:18 -08:00