fix: always strip old functionCall/functionResponse from LS history
The function call stripping was only happening when no custom tools were present. But even with custom tools injected, the LS history contains functionCall/functionResponse parts for LS-internal tools that we stripped, causing MALFORMED_FUNCTION_CALL. Now always strip regardless of custom tools presence.
This commit is contained in:
@@ -726,6 +726,12 @@ async fn handle_http_over_tls(
|
||||
}
|
||||
headers_parsed = true;
|
||||
|
||||
// Log error response bodies for debugging
|
||||
if resp.code.unwrap_or(0) >= 400 {
|
||||
let body_preview = String::from_utf8_lossy(&header_buf[hdr_end..]);
|
||||
warn!(domain, status = resp.code.unwrap_or(0), body = %body_preview, "MITM: upstream error response");
|
||||
}
|
||||
|
||||
// Save body for usage parsing
|
||||
response_body_buf.extend_from_slice(&header_buf[hdr_end..]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user