-
Notifications
You must be signed in to change notification settings - Fork 848
TS-4732: Changing the do_io_read API so it can be called with NULL and #857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0 byte values. Allowing do_io_read and do_io_write to not warn on closed connection when we are only trying to disable the reads and writes for it. Removed some macros that were used in a few places (not all the time) and a couple that were not used at all.
|
I've been thinking about this and wonder if we should avoid this and have an explicit |
|
FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/523/ for details. |
|
Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/420/ for details. |
| VIO * | ||
| UnixNetVConnection::do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf) | ||
| { | ||
| ink_assert(c || 0 == nbytes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe move this assert after the new check and add an equivalent one to do_io_write?
|
Looks good. Having an explicit disable_io_read/write might be nice. But using NULL's to clear out the current io's does't seem too surprising. |
|
Yeah, I started down the path of disable_read() and disable_write(), then ran into having to implement the methods in multiple locations (pluginvc) when declaring them pure virtual. I might switch back to disable_read() and disable_write()... |
|
I am going to go with this right now and open a bug for disable_read() and disable_write() |
Revert "Give a chance to send a response before receiving next request on H2 (apache#9997)" This reverts commit 62abe06. I'm reverting this commit because it seems to introduce the crash seen in YTSATS-4273.
* Fix pipelined request for chunked bodies This addresses a variety of bugs concerning pipelined requests. In particular, the HttpTunnel logic had fundamentally assumed that it could consume all bytes available in the producer's reader. If a request was pipelined after a previous request that had a chunked body, this would result in the second request being unparsed and either sent along to the origin or dropped on the floor, depening on configuration. This adds an explicit autest for pipelined requests and addresses these issues. This patch largely does the following: 1. Updates the copy_partial_post_data data to take the number of bytes it consumes rather than consuming all bytes in the reader. It also now returns the number of bytes it consumes, which the tunnel needs to keep track of the number of bytes it processes. 2. Previous to this patch, the HttpTunnel assumed that it could consume all bytes in the reader originally passed to it (all bytes in init_bytes_done). This simply will not work for pipelined requests. This addresses this issue by adding a new variable to the tunnel: bytes_consumed. This way the tunnel can keep track of how many bytes it consumed while processing the request body, which allows the HttpSM to later process just the right number of bytes from its reader rather than eating into any pipelined requests that follow it. 3. The HttpSM must not consume bytes from its client reader that are pipelined requests. It now uses the tunnel's processing bytes_consumed to process bytes from its reader rather than simply consuming all read_available() bytes from it. * Fix bytes consumed chunk computation Fix a possible miscalculation of bytes consumed while parsing chunked content. * Test verification updates. --------- Co-authored-by: Brian Neradt <brian.neradt@gmail.com>
0 byte values. Allowing do_io_read and do_io_write to not warn on closed
connection when we are only trying to disable the reads and writes for it.
Removed some macros that were used in a few places (not all the time) and
a couple that were not used at all.