Index: src/OFHTTPRequest.m ================================================================== --- src/OFHTTPRequest.m +++ src/OFHTTPRequest.m @@ -304,11 +304,12 @@ } while (*tmp == ' '); value = [OFString stringWithUTF8String: tmp]; if ((redirects > 0 && (status == 301 || status == 302 || - status == 303) && [key isEqual: @"Location"]) && + status == 303 || status == 307) && + [key isEqual: @"Location"]) && (redirectsFromHTTPSToHTTPAllowed || [scheme isEqual: @"http"] || ![value hasPrefix: @"http://"])) { OFURL *new; BOOL follow; @@ -381,10 +382,11 @@ intoBuffer: buffer]; [delegate request: self didReceiveData: buffer withLength: length]; + [pool2 releaseObjects]; bytesReceived += length; [data addNItems: length fromCArray: buffer]; @@ -442,11 +444,18 @@ result = [[OFHTTPRequestResult alloc] initWithStatusCode: status headers: serverHeaders data: data]; - if (status != 200 && status != 301 && status != 302 && status != 303) { + switch (status) { + case 200: + case 301: + case 302: + case 303: + case 307: + break; + default: [result release]; @throw [OFHTTPRequestFailedException exceptionWithClass: isa HTTPRequest: self result: result];