546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
|
OFURL *newURL;
bool follow;
newURL = [OFURL URLWithString: redirect
relativeToURL: URL];
if ([_delegate respondsToSelector:
@selector(client:shouldFollowRedirect:request:)])
follow = [_delegate client: self
shouldFollowRedirect: newURL
request: request];
else {
/*
* 301, 302 and 307 should only redirect with user
* confirmation if the request method is not GET or
* HEAD. Asking the delegate and getting true returned
* is considered user confirmation.
|
|
>
|
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
|
OFURL *newURL;
bool follow;
newURL = [OFURL URLWithString: redirect
relativeToURL: URL];
if ([_delegate respondsToSelector:
@selector(client:shouldFollowRedirect:statusCode:request:)])
follow = [_delegate client: self
shouldFollowRedirect: newURL
statusCode: status
request: request];
else {
/*
* 301, 302 and 307 should only redirect with user
* confirmation if the request method is not GET or
* HEAD. Asking the delegate and getting true returned
* is considered user confirmation.
|