Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: I am having problems with both redirection and detecting redirection

by Anonymous Monk
on Sep 27, 2012 at 02:26 UTC ( #995907=note: print w/ replies, xml ) Need Help??


in reply to I am having problems with both redirection and detecting redirection

I do not know why LWP is not following the redirection.

$ perldoc LWP::UserAgent |ack -i redir max_redirect 7 requests_redirectable ['GET', 'HEAD'] $ua->max_redirect $ua->max_redirect( $n ) redirection responses in a given request cycle. method and the response is a redirect elsewhere which is in tu +rn a redirect, and so on seven times, then LWP gives up after that $ua->requests_redirectable $ua->requests_redirectable( \@requests ) "$ua->redirect_ok(...)" will allow redirection for. By default +, this push @{ $ua->requests_redirectable }, 'POST'; received, but before any redirect handling is attempted. T +he response_redirect => sub { my($response, $ua, $h) = @_; ... } The request() method will process redirects and authentication to handle redirects or authentication responses. The request() $ua->redirect_ok( $prospective_request, $response ) redirection to the request in $response. This should return a +TRUE value if this redirection is permissible. The $prospective_req +uest the object's "requests_redirectable" list, FALSE if the propos +ed redirection is to a "file://..." URL, and TRUE otherwise.


Comment on Re: I am having problems with both redirection and detecting redirection
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995907]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2015-07-04 10:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls