Skip to content

Conversation

@bneradt
Copy link
Contributor

@bneradt bneradt commented Nov 10, 2025

This adds a test for POST body failover via the escalate plugin. This also fixes the tunnel logic so the body can be sent, especially for small POST bodies.

@bneradt bneradt added this to the 10.2.0 milestone Nov 10, 2025
@bneradt bneradt self-assigned this Nov 10, 2025
@bneradt bneradt added the escalate escalate plugin label Nov 10, 2025
This adds a test for POST body failover via the escalate plugin. This
also fixes the tunnel logic so the body can be sent, especially for
small POST bodies.
@bneradt bneradt force-pushed the fix_escalate_with_post_bodies branch from 7501d11 to 761d17b Compare November 10, 2025 20:25
@cmcfarlen cmcfarlen requested a review from moonchen November 10, 2025 22:40
@bryancall bryancall added the Bug label Nov 17, 2025
// but limit it to the actual content length to avoid copying pipelined requests.
if (p->vc_type == HttpTunnelType_t::HTTP_CLIENT && sm->enable_redirection && body_bytes_to_copy == 0) {
int64_t bytes_available = p->buffer_start->read_avail();
bytes_to_copy_now = (p->total_bytes >= 0) ? std::min(bytes_available, p->total_bytes) : bytes_available;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would happen here if the POST request is chunked? I think p->total_bytes is INT64_MAX so it would copy everything buffered from TLS, including possibly the next pipelined POST request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug escalate escalate plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants