mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
* 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:
parent
7e2dfe453b
commit
4de027cd20
4 changed files with 61 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue