typefind: fix reading file extension from URI
Currently reading extension relies on the fact that everything after the last"." character is a file extension. Whereas that works fine for most of the cases, it breaks when the URI contains a query part.
E.g.: http://url.com/file.mp4?param=value
returns mp4?param=value
instead of mp4
.
In this commit we use URI parser to read the path of the URI (in the example
above, that is /file.mp4
) and read extension from that path.