Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #90.
The bundled magic rules recognize the reported file as Vorbis audio, but inherit
application/oggfrom the generic Ogg rule. Setaudio/oggon the existing Vorbis continuation, consistent with RFC 5334 section 10.3.Add
ContentType.OGAfor the audio MIME type and its associated extensions. Keep the existing extension-only.ogg,.ogaand.spxlookups mapped toOGG. Unidentified Ogg, unknown revisions and other codec rules retain their previous behavior. This is a focused Vorbis classification change, not a general multiplexed-Ogg inspection.The tests use newly constructed identification-page prefixes, with no music file added to the repository. They cover default byte-array and InputStream detection, explicit plaintext rules, MIME metadata, generic/video fallbacks and extension-only lookups. Maven's existing compile step continues to generate the bundled
magic.gzfrom the updated rules.Validation on Linux with JDK 11.0.32.1:
mvn --batch-mode --no-transfer-progress --show-version clean packagepasses 366 tests, with two existing ignored tests and no failures or errors (368 entries). This is the repository CI build command and includes Javadoc and packaging.audio/oggandOGA. The attachment is retained only as a local diagnostic input.Focused command:
mvn --batch-mode --no-transfer-progress --show-version -Dtest=OggMimeTypeTest test