You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ez...@apache.org on 2021/06/01 17:17:17 UTC
[trafficserver] branch 8.1.x updated: Fix the final consumer write
size from unchunked to chunked tunnel (#7577) (#7908)
This is an automated email from the ASF dual-hosted git repository.
eze pushed a commit to branch 8.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/8.1.x by this push:
new c4e4170 Fix the final consumer write size from unchunked to chunked tunnel (#7577) (#7908)
c4e4170 is described below
commit c4e4170d5815b3a5341a2bac26bb0922b26d4bf0
Author: Brian Neradt <br...@gmail.com>
AuthorDate: Tue Jun 1 12:17:05 2021 -0500
Fix the final consumer write size from unchunked to chunked tunnel (#7577) (#7908)
(cherry picked from commit 8977a45054302b37bcc0d0a1cca3ad2dae98df6a)
Co-authored-by: Susan Hinrichs <sh...@yahoo-inc.com>
---
proxy/http/HttpTunnel.cc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc
index 5ac2e73..1f7d210 100644
--- a/proxy/http/HttpTunnel.cc
+++ b/proxy/http/HttpTunnel.cc
@@ -1057,16 +1057,18 @@ HttpTunnel::producer_handler_dechunked(int event, HttpTunnelProducer *p)
// We only interested in translating certain events
switch (event) {
- case VC_EVENT_READ_READY:
case VC_EVENT_READ_COMPLETE:
case HTTP_TUNNEL_EVENT_PRECOMPLETE:
case VC_EVENT_EOS:
+ p->alive = false; // Update the producer state for final_consumer_bytes_to_write
+ /* fallthrough */
+ case VC_EVENT_READ_READY:
p->last_event = p->chunked_handler.last_server_event = event;
if (p->chunked_handler.generate_chunked_content()) { // We are done, make sure the consumer is activated
HttpTunnelConsumer *c;
for (c = p->consumer_list.head; c; c = c->link.next) {
if (c->alive) {
- c->write_vio->nbytes = p->chunked_handler.chunked_size;
+ c->write_vio->nbytes = final_consumer_bytes_to_write(p, c);
// consumer_handler(VC_EVENT_WRITE_COMPLETE, c);
}
}