* Source/GSURLPrivate.h: Addition of private method to NSURLProtocol

category.
	* Source/NSURLConnection.m: Changes to use the new method and to correct
	bug #26107.  Patch by: doug@riverrock.org
	* Source/NSURLProtocol.m: Addition of static method to look up class 
	which can handle the given connection protocol.  
	Patch by: doug@riverrock.org


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28229 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2009-04-18 14:22:54 +00:00
parent 7e2dfe453b
commit 4de027cd20
4 changed files with 61 additions and 3 deletions

View file

@ -341,6 +341,26 @@ static NSURLProtocol *placeholder = nil;
return NO;
}
+(Class) _classToHandleRequest:(NSURLRequest *)request
{
Class protoClass = nil;
[regLock lock];
int count = [registered count];
while (count-- > 0)
{
Class proto = [registered objectAtIndex: count];
if ([proto canInitWithRequest: request] == YES)
{
protoClass = proto;
break;
}
}
[regLock unlock];
return protoClass;
}
+ (void) setProperty: (id)value
forKey: (NSString *)key
inRequest: (NSMutableURLRequest *)request