mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
Chunked encoding doesn’t require the length of the request body to be known in advance. In cases where this value isn’t independently known, as is normal for Crashpad report uploads where the HTTP request body is constructed on the fly, chunked encoding eliminates the need to prepare the entire request body in memory before transmitting it. In these cases, it’s much less wasteful. When the length of the request body is known in advance, based on the provision of a Content-Length header, chunked encoding is not used. Even so, the request is sent in pieces rather than reading the entire request into memory before sending anything. BUG=crashpad:159 TEST=crashpad_util_test HTTPTransport.* Change-Id: Iebb2b63b936065cb8c3c4a62b58f9c14fec43937 Reviewed-on: https://chromium-review.googlesource.com/439644 Reviewed-by: Scott Graham <scottmg@chromium.org>