-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
MimeTypeDetector fails for local URIs #824
Comments
You are thinking of URIs like |
Exactly, the current implementation seems to work for http URLs only. I also tried to write a test, but trying to get absolute paths in Java annoyed me a bit. |
The question is what URLs/Paths should MimeTypeDetector be able to categorize. |
URLConnection works for local URIs as well as http URLs. |
👍 for adding a test :) |
Mhhh... the code checks the HTTP header To be honest, I don't see the use-case to allow local URIs. Are you trying to check that a file with |
|
I already created a test, but will only push it later so it doesn't break the build. |
When a URL encoded local URI is passed to the function
MimeTypeDetector.isPdfContentType(String url)
the return value turns out to be False if
url
is a local URI.If one likes to implement
FullTextFinder
using a temporary copy of some fetched PDF this needs to be changed.The text was updated successfully, but these errors were encountered: