mirror of
https://github.com/katanemo/plano.git
synced 2026-06-26 15:39:40 +02:00
fix(llm_gateway): use envoy body_size for response body replacement
Co-authored-by: Musa <musa@spherrrical.dev>
This commit is contained in:
parent
0348ca1d11
commit
60da45a6ee
1 changed files with 2 additions and 2 deletions
|
|
@ -1206,7 +1206,7 @@ impl HttpContext for StreamContext {
|
||||||
String::from_utf8_lossy(&body)
|
String::from_utf8_lossy(&body)
|
||||||
);
|
);
|
||||||
// Forward the error response as-is
|
// Forward the error response as-is
|
||||||
let replace_size = if self.streaming_response {
|
let replace_size = if body_size > 0 {
|
||||||
body_size
|
body_size
|
||||||
} else {
|
} else {
|
||||||
body.len()
|
body.len()
|
||||||
|
|
@ -1248,7 +1248,7 @@ impl HttpContext for StreamContext {
|
||||||
return Action::Continue;
|
return Action::Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let replace_size = if self.streaming_response {
|
let replace_size = if body_size > 0 {
|
||||||
body_size
|
body_size
|
||||||
} else {
|
} else {
|
||||||
body.len()
|
body.len()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue