nodeca / probe-image-size

Get image size without full download. Supported image types: JPG, GIF, PNG, WebP, BMP, TIFF, SVG, PSD, ICO.
MIT License
978 stars 77 forks source link

probing svg file that does not exist never return #81

Open terchris opened 1 year ago

terchris commented 1 year ago

I have a situation where I probe a SVG file that does not exist. The code below never timeout and just hang.

        const result = await probe(imageUrl, {
            open_timeout: 5000,
            response_timeout: 5000,
            read_timeout: 5000,
            follow_max: 10
        });

When opening the SVG file in the browser I get: This page isn’t workingwww.senja-avfall.no redirected you too many times. Try clearing your cookies. ERR_TOO_MANY_REDIRECTS

The SVG file I try to load is: In the browser it redirects to: https://www.senja-avfall.no/no/404?id=65

PS I know that probe-image-size does not support probing svg files. A bug in my code resulted in calling probe.