Yes, of course, but I've just changed:

$m->max_redirect(2);

to:

$m->max_redirect(0);

On a closer look, the result is not entirely the same but also not much better (redirect loop detected):

Cache-Control: no-cache, no-store, max-age=0, must-revalidate Date: Fri, 22 Nov 2019 22:25:09 GMT Pragma: no-cache Via: url Server: servername Vary: Accept-Encoding,Origin Content-Encoding: gzip Content-Language: en Content-Length: 6336 Content-Type: text/html;charset=UTF-8 Expires: 0 Client-Date: Fri, 22 Nov 2019 22:29:13 GMT Client-Peer: xxx.xxx.xxx.xxx:443 Client-Response-Num: 1 Client-SSL-Cert-Issuer: /certinfo Client-SSL-Cert-Subject: /certinfo Client-SSL-Cipher: ECDHE-RSA-AES256-GCM-SHA384 Client-SSL-Socket-Class: IO::Socket::SSL Client-SSL-Warning: Peer certificate not verified Client-Warning: Redirect loop detected (max_redirect = 0) Strict-Transport-Security: max-age=15768000 ; includeSubDomains Strict-Transport-Security: max-age=15768000 X-Content-Type-Options: nosniff X-Frame-Options: DENY X-XSS-Protection: 1; mode=block

Strange, isn't it?


In reply to Re^4: WWW::Mechnize redirect handling by nikster
in thread [Solved] WWW::Mechnize redirect handling by nikster

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.