Index: src/OFHTTPClient.h ================================================================== --- src/OFHTTPClient.h +++ src/OFHTTPClient.h @@ -78,15 +78,17 @@ * redirect. If the maximum number of redirects has been reached already, this * callback will not be called. * * @param client The OFHTTPClient which wants to follow a redirect * @param URL The URL to which it will follow a redirect + * @param statusCode The status code for the redirection * @param request The request for which the OFHTTPClient wants to redirect * @return A boolean whether the OFHTTPClient should follow the redirect */ - (bool)client: (OFHTTPClient*)client shouldFollowRedirect: (OFURL*)URL + statusCode: (int)statusCode request: (OFHTTPRequest*)request; @end /*! * @brief A class for performing HTTP requests. Index: src/OFHTTPClient.m ================================================================== --- src/OFHTTPClient.m +++ src/OFHTTPClient.m @@ -548,13 +548,14 @@ newURL = [OFURL URLWithString: redirect relativeToURL: URL]; if ([_delegate respondsToSelector: - @selector(client:shouldFollowRedirect:request:)]) + @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