-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jetty 12 mimetype cleanup #8919
Conversation
Signed-off-by: Greg Wilkins <gregw@webtide.com>
…leanup' into jetty-12-mimetype-cleanup # Conflicts: # jetty-ee9/jetty-ee9-servlets/src/main/java/org/eclipse/jetty/ee9/servlets/IncludeExcludeBasedFilter.java
jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/Response.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes
jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/MimeTypes.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/MimeTypes.java
Show resolved
Hide resolved
…type-cleanup # Conflicts: # jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipHandlerTest.java
…-jdk-20' into jetty-12-mimetype-cleanup
…-jdk-20' into jetty-12-mimetype-cleanup
…type-cleanup # Conflicts: # jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipHandlerTest.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from a couple of finals etc. seems good.
jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/MimeTypes.java
Outdated
Show resolved
Hide resolved
jetty-core/jetty-http/src/main/java/org/eclipse/jetty/http/MimeTypes.java
Outdated
Show resolved
Hide resolved
@@ -30,6 +30,8 @@ public static Stream<Arguments> mimeTypesByExtensionCases() | |||
{ | |||
return Stream.of( | |||
Arguments.of("test.gz", "application/gzip"), | |||
Arguments.of("test.tar.gz", "application/gzip"), | |||
Arguments.of("test.tgz", "application/x-gtar"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is deliberate, yes? You removed type application/x-gtar
from mime.properties ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. Aligning with common extension handling practice of just looking at the final dot segment. This is more efficient, same as most other projects and there is only one extension we had with a dot in it.
Cleanup a bunch of TODOs related to MimeType lookup.
Primarily
MimeTypes
are now available via theContext
.