On 14/08/2020 00:42, Karen Etheridge via RT wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=133155 >
>
> On 2020-08-13 06:40:26, RRWO wrote:
>> This is a minor issue, and is easily worked-around by passing a custom
>> HTTP::Request that contains a User-Agent, for code that requires it be set.
>>
>> But technically all HTTP requests should have one, so one should be set.
>> This should be easily done in _customize_request by one line:
>>
>> $request->header( "User-Agent" =>
>> "Catalyst::Test/${Catalyst::VERSION}" );
> I get that one SHOULD (in the RFC sense of the word) provide a User-Agent, but code should be able to handle the lack of one, as it is not a required header. (It looks like HTTP 1.0 requires no headers, and HTTP 1.1 only requires HOST.)
>
> What things are failing when this header is not populated?
Nothing "core" is failing. At $work we have some modified code that
requires a user-agent header. (Basically, it's an easy way to filter out
a large portion of the script kiddies.) It's an easy enough work-around
in the tests, but it's tedious.
The tests that are based on Test::WWW::Mechanize::{Catalyst,PSGI} don't
have this problem, because WWW::Mechanize already sets the header.