diff --git a/ChangeLog b/ChangeLog index 49cfab31c..963b93614 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-03-08 Richard Frith-Macdonald + + * Source/Addictions/GSXML.m: Cope with cancellation of load from URL + in XMLRPC better. + 2007-03-08 Nicola Pero * Source/NSPathUtilities.h (GSAdminToolsDirectory): New directory diff --git a/Source/Additions/GSXML.m b/Source/Additions/GSXML.m index 16bb46435..709ea85c5 100644 --- a/Source/Additions/GSXML.m +++ b/Source/Additions/GSXML.m @@ -5407,9 +5407,20 @@ static void indentation(unsigned level, NSMutableString *str) - (void) URLHandleResourceDidCancelLoading: (NSURLHandle*)sender { - ASSIGN(result, @"timeout"); + NSString *str; + [timer invalidate]; timer = nil; + str = [handle propertyForKeyIfAvailable: NSHTTPPropertyStatusCodeKey]; + if (str == nil) + { + str = @"timeout"; + } + else + { + str = [NSString stringWithFormat: @"HTTP status %@", str]; + } + ASSIGN(result, str); if ([delegate respondsToSelector: @selector(completedXMLRPC:)]) { [delegate completedXMLRPC: self];