+2007-11-20 Helge Hess <helge.hess@opengroupware.org>
+
+ * NGXmlRpcClient.m: add redirect locations to error reason (v4.7.17)
+
2007-02-12 Helge Hess <helge.hess@opengroupware.org>
* NGXmlRpcClient.m: fixed a gnustep-base compilation warning (v4.7.16)
NSException *exc;
NSString *r;
NSDictionary *ui;
+ int status;
#if 0
NSLog(@"%s: XML-RPC response status: %i", __PRETTY_FUNCTION__,
/* construct exception */
+ status = [_response status];
r = [NSString stringWithFormat:@"call failed with HTTP status code %i",
- [_response status]];
+ status];
+ if (status == 301 || status == 302) {
+ NSString *l = [_response headerForKey:@"location"];
+ if ([l isNotEmpty])
+ r = [NSString stringWithFormat:@"%@ [location=%@]", r, l];
+ }
ui = [NSDictionary dictionaryWithObjectsAndKeys:
self, @"NGXmlRpcClient",
_response, @"WOResponse",
- [NSNumber numberWithInt:[_response status]],
+ [NSNumber numberWithInt:status],
@"HTTPStatusCode",
nil];