]> err.no Git - sope/commitdiff
added redirect locations
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 20 Nov 2007 11:46:48 +0000 (11:46 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Tue, 20 Nov 2007 11:46:48 +0000 (11:46 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1548 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/NGXmlRpc/ChangeLog
sope-appserver/NGXmlRpc/NGXmlRpcClient.m
sope-appserver/NGXmlRpc/Version

index 44120b436730b12ccea64c748b0ab9ef2656b80e..e82e1d6b492ee43d880a820ced5dd59bd09e3b02 100644 (file)
@@ -1,3 +1,7 @@
+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)
index 4d1fc810803ba7f398fa6cecab4147f8ebf67280..a645ea32cce26f2f5b661eaac8c38c0be0b994a6 100644 (file)
   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];
   
index 0a8bca08b028c66e6050ed1d0523f0c70aac5617..3c3eedfd9be9674738563e52ca04e222c558e0b0 100644 (file)
@@ -1,3 +1,3 @@
 # version file
 
-SUBMINOR_VERSION:=16
+SUBMINOR_VERSION:=17