--- UserAgent.pm.orig	Fri Aug  2 08:17:42 2002
+++ UserAgent.pm	Fri Aug  2 08:47:25 2002
@@ -445,7 +445,9 @@
 		       "Unknown code $code"));
 
     if ($code == &HTTP::Status::RC_MOVED_PERMANENTLY or
-	$code == &HTTP::Status::RC_MOVED_TEMPORARILY) {
+	$code == &HTTP::Status::RC_FOUND or
+	$code == &HTTP::Status::RC_SEE_OTHER or
+	$code == &HTTP::Status::RC_TEMPORARY_REDIRECT) {
 
 	# Make a copy of the request and initialize it with the new URI
 	my $referral = $request->clone;
@@ -464,7 +466,11 @@
 	$referral->url($referral_uri);
 	$referral->remove_header('Host', 'Cookie');
 
-	return $response unless $self->redirect_ok($referral);
+	if ($code == &HTTP::Status::RC_SEE_OTHER) {
+	    $referral->method("GET");
+	} else {
+	    return $response unless $self->redirect_ok($referral);
+	}
 
 	# Check for loop in the redirects
 	my $count = 0;


Reply via email to