jetty / jetty.project

Eclipse Jetty® - Web Container & Clients - supports HTTP/2, HTTP/1.1, HTTP/1.0, websocket, servlets, and more
https://eclipse.dev/jetty
Other
3.86k stars 1.91k forks source link

Issue #12397 - Add more default excludes to GzipHandler. #12414

Closed joakime closed 3 weeks ago

joakime commented 3 weeks ago

Fixes: #12397

joakime commented 3 weeks ago

@gregw with this change, I see yet another thing that MimeTypes should probably do (flag if a mime-type represents compressed content that shouldn't be recompressed).

What do you think about refactoring the MimeTypes configuration files a great deal?

We could use json, and our jetty-util-ajax lib ...

[
  "application/gzip" : {
    "extensions": [ ".gz", ".gzip" ],
    "assumedCharset": "",
    "inferredCharset": ""
    "ignoreCharset": "true"
    "compressedType": "true"
  },
  "application/json" : {
    "extensions": [ ".json" ],
    "assumedCharset": "utf-8",
    "inferredCharset": ""
    "ignoreCharset": "false"
    "compressedType": "false"
  }
]

The idea is that this becomes our preferred configuration file, but we still allow the use of the older mime.properties and encoding.properties as an alternate deprecated configuration technique.