|We don't bite newbies here... much|
LWP::UserAgent : setting max_redirect to 0 yields 'Client-Warning: Redirect loop detectedby bliako (Friar)
|on Mar 13, 2018 at 18:38 UTC||Need Help??|
bliako has asked for the
wisdom of the Perl Monks concerning the following question:
Sisters and Brothers,
I am trying to tell LWP::UserAgent (UA) not to follow any redirect (for example, a server response of '302 Found').
I would like UA to simply make a request and then just to return the HTTP::Response back to me.
So, I create UA as thus:
With the above, I can see in my logs that indeed UA does not follow the redirect but now I get a warning:
Client-Warning: Redirect loop detected (max_redirect = 0)
which is produced in this check in LWP::UserAgent.pm (sub request):
The redirect count is zero, the max_redirects is zero but that does not mean a redirect loop has been detected.
Or am I confused (just in this particular issue)?