File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 66- Improve handling of non-UTF-8 header values in ` Logger ` middleware.
77- Add ` HttpServer::shutdown_signal() ` method.
88- Mark ` HttpServer ` as ` #[must_use] ` .
9+ - Allow SVG images to be compressed by the ` Compress ` middleware.
910- Ignore ` Host ` header in ` Host ` guard when connection protocol is HTTP/2.
1011- Re-export ` mime ` dependency.
1112- Update ` brotli ` dependency to ` 8 ` .
Original file line number Diff line number Diff line change @@ -191,8 +191,10 @@ where
191191 None => true ,
192192 Some ( hdr) => {
193193 match hdr. to_str ( ) . ok ( ) . and_then ( |hdr| hdr. parse :: < Mime > ( ) . ok ( ) ) {
194- Some ( mime) if mime. type_ ( ) . as_str ( ) == "image" => false ,
195- Some ( mime) if mime. type_ ( ) . as_str ( ) == "video" => false ,
194+ Some ( mime) if mime. type_ ( ) == mime:: IMAGE => {
195+ matches ! ( mime. subtype( ) , mime:: SVG )
196+ }
197+ Some ( mime) if mime. type_ ( ) == mime:: VIDEO => false ,
196198 _ => true ,
197199 }
198200 }
You can’t perform that action at this time.
0 commit comments