Skip to content

Commit

Permalink
fix: Compression middleware does not set body back if body can not co…
Browse files Browse the repository at this point in the history
…mpress (#827)
  • Loading branch information
chrislearn authored Jul 3, 2024
1 parent 897753e commit b8370cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/compression/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,10 @@ impl Handler for Compression {
}
}
}
_ => {}
body => {
res.body(body);
return;
}
}
res.headers_mut().remove(CONTENT_LENGTH);
}
Expand Down

0 comments on commit b8370cb

Please sign in to comment.