Fixup for handling cancelled URL loads.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24819 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2007-03-08 08:57:58 +00:00
parent c632fa6fb5
commit 642dd459bd
2 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2007-03-08 Richard Frith-Macdonald <rfm@gnu.org>
* Source/Addictions/GSXML.m: Cope with cancellation of load from URL
in XMLRPC better.
2007-03-08 Nicola Pero <nicola.pero@meta-innovation.com>
* Source/NSPathUtilities.h (GSAdminToolsDirectory): New directory

View file

@ -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];