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

Issue with description of WebM sniffing #126

Open
velezbeltran opened this issue Aug 21, 2020 · 1 comment
Open

Issue with description of WebM sniffing #126

velezbeltran opened this issue Aug 21, 2020 · 1 comment

Comments

@velezbeltran
Copy link

Hey!
I am currently implementing a version of the specification and I noticed something odd in one of the algorithms. In section 6.2.2 I think that step 6.5 I think that it should be greater than instead of less than.
Imagine for example a very large resource. You only require the beginning of the resource to determine the mime-type. As it is implemented right now, this is saying that if you are looking at the beginning you should break. Which is not correct. You should only break if you are too close to the end.
image

@Gallaecio
Copy link

I’m not sure that’s wrong.

The current algorithm seems to tell you to find number size within the first 38 bytes, and then if number size takes you to 4 bytes before the end, and the end is "webm", return true.

Without knowing the WebM standard, the algorithm does not sound illogical to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants