Issue Bug Closed

#88958Linkvalidator: incorrect range specification

Dmitry Dulepov 08/14/19, 16:46 updated 12/23/19, 22:51

Description

EXT:linkvalidator/Classes/Linktype/ExternalLinktype.php, function checkLink near line 88:

                // HEAD was not allowed or threw an error, now trying GET
                $options['headers']['Range'] = 'bytes = 0 - 4048';
                $isValidUrl = $this->requestUrl($url, 'GET', $options);

According to RFC 7233 there can be no spaces in range specification. Some web servers strictly follow this and throw a 416 http error.

Simple remove spaces like this:

                // HEAD was not allowed or threw an error, now trying GET
                $options['headers']['Range'] = 'bytes=0-4048';
                $isValidUrl = $this->requestUrl($url, 'GET', $options);

Reviews 3