Skip to content
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

Merged
merged 21 commits into from
Nov 23, 2022
Merged

Jetty 12 mimetype cleanup #8919

merged 21 commits into from
Nov 23, 2022

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Nov 20, 2022

Cleanup a bunch of TODOs related to MimeType lookup.
Primarily MimeTypes are now available via the Context.

@gregw gregw marked this pull request as ready for review November 21, 2022 00:00
Copy link
Contributor

@lachlan-roberts lachlan-roberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@joakime joakime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes

…type-cleanup

# Conflicts:
#	jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipHandlerTest.java
…type-cleanup

# Conflicts:
#	jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipHandlerTest.java
Copy link
Contributor

@janbartel janbartel left a 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.

@@ -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"),
Copy link
Contributor

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 ...

Copy link
Contributor Author

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.

@gregw gregw requested a review from janbartel November 21, 2022 23:53
@gregw gregw merged commit a44af98 into jetty-12.0.x Nov 23, 2022
@gregw gregw deleted the jetty-12-mimetype-cleanup branch November 23, 2022 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants