This repository has been archived by the owner on Dec 3, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a bug that breaks large upload requests.
When a client issue an upload request of sufficient size to WebPageReplay (10MB +), WPR resets the connection, sends a TCP RST error, and causes the client to abort the upload. The root cause for this issue is that WPR does not clear the request body buffer. Uploading a large file to WPR is an uncommon scenario. Since WPR does not use the request body, it never reads the request body. Here is how I speculate this error plays out: When a client issues an upload request, the request body buffer fills up and blocks further upload bytes from being sent. When WPR responds to the request, the underlying Go code closes the input channel of the connection to prevent the client from sending more data. This results in the operating system issuing a TCP "connection reset by peer" message back to the client. The fix is to read every request body to ensure that the request body buffer is always clear, before responding to requests. Bug: catapult:#1215668 Change-Id: I2b2880b2487c2412eb9a8f70558e8f9700ae11af Reviewed-on: https://chromium-review.googlesource.com/c/catapult/+/2934719 Reviewed-by: Ian Struiksma <ianstruiksma@google.com> Commit-Queue: Yiming Zhou <uwyiming@google.com>
- Loading branch information