Commit 32087de
committed
Fix set-body at remap and escalate plugin interaction with internal_msg_buffer
In EndRemapRequest, the previous fix unconditionally cleared
internal_msg_buffer in the else branch (remap success path).
This destroyed the body set by set-body at remap hooks when no
set-status was used, causing ATS to contact the origin instead
of serving the synthetic response.
Fix: Only clear internal_msg_buffer when a plugin tunnel is
active (the original intent - clearing stale error bodies from
build_error_response during remap failures for plugin tunnels).
Also clear internal_msg_buffer in redirect_request() to prevent
stale error bodies from build_error_response (e.g., connection
failures) from being mistaken for plugin-set synthetic bodies
by how_to_open_connection() during redirect/retry flows like
the escalate plugin.1 parent 281ecf8 commit 32087de
2 files changed
Lines changed: 17 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8558 | 8558 | | |
8559 | 8559 | | |
8560 | 8560 | | |
| 8561 | + | |
| 8562 | + | |
| 8563 | + | |
| 8564 | + | |
8561 | 8565 | | |
8562 | 8566 | | |
8563 | 8567 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1233 | 1233 | | |
1234 | 1234 | | |
1235 | 1235 | | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
1239 | 1249 | | |
1240 | 1250 | | |
1241 | 1251 | | |
| |||
0 commit comments