Skip to content

Commit

Permalink
feat(ext/http): Support compression on text/event-stream
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-ang committed Jan 22, 2025
1 parent c930e13 commit 771fd97
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/http/compressible.rs
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ static CONTENT_TYPES: phf::Set<&'static [u8]> = phf_set! {
b"text/cmd",
b"text/css",
b"text/csv",
b"text/event-stream",
b"text/html",
b"text/javascript",
b"text/jsx",
Expand Down Expand Up @@ -651,6 +652,7 @@ mod tests {
#[test]
fn compressible_content_type() {
assert!(is_content_compressible("application/json"));
assert!(is_content_compressible("text/event-stream"));
assert!(is_content_compressible("text/plain;charset=UTF-8"));
assert!(is_content_compressible("text/PlAIn; charset=utf-8"));
}
Expand Down

0 comments on commit 771fd97

Please sign in to comment.