Skip to content

Commit

Permalink
fix(kawa_h1): give response stream instead of request stream
Browse files Browse the repository at this point in the history
* Fix an index out of bound issue
* We are in the request parsing stream, so we should diagnostic
  the response is something goes wrong

Signed-off-by: Florentin Dubois <florentin.dubois@clever-cloud.com>
  • Loading branch information
FlorentinDUBOIS committed Jun 3, 2024
1 parent 5412e6c commit a1dfe01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/protocol/kawa_h1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ impl<Front: SocketHandler, L: ListenerHandler + L7ListenerHandler> Http<Front, L
if response_stream.consumed {
return SessionResult::Close;
} else {
let (message, details) = diagnostic_400_502(marker, kind, &self.request_stream);
let (message, details) = diagnostic_400_502(marker, kind, response_stream);
self.set_answer(DefaultAnswer::Answer502 {
phase: marker,
details,
Expand Down

0 comments on commit a1dfe01

Please sign in to comment.