Re: [libav-devel] [PATCH] img2dec: Handle query parameters when checking extensions

2016-02-24 Thread Vittorio Giovara
On Wed, Feb 24, 2016 at 1:43 PM, Vittorio Giovara wrote: > A webserver omits the Content-Type or if mime-magic fails for unexpected > reasons, probing an image HTTP URL with query parameters will fail in > the extension match. > > So check the protocol used is http or

[libav-devel] [PATCH] img2dec: Handle query parameters when checking extensions

2016-02-24 Thread Vittorio Giovara
A webserver omits the Content-Type or if mime-magic fails for unexpected reasons, probing an image HTTP URL with query parameters will fail in the extension match. So check the protocol used is http or https, and drop anything after the first query parameter when evaluating an image URL.