mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Minor tweaks and comments added
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25150 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6226311c10
commit
cc25eedb9e
4 changed files with 35 additions and 17 deletions
|
@ -1,3 +1,10 @@
|
|||
2007-05-14 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSURLProtocol.m:
|
||||
* Source/NSURLRequest.m:
|
||||
* Source/NSURLConnection.m:
|
||||
Added tweaks for redirection andvarious comments.
|
||||
|
||||
2007-05-14 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/Additions/Unicode.m:
|
||||
|
@ -63,7 +70,7 @@
|
|||
|
||||
2007-04-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSBundle.m: Reformat for conding standards. Alter library
|
||||
* Source/NSBundle.m: Reformat for coding standards. Alter library
|
||||
resource lookup to find correct version when multiple versions of
|
||||
the base library are installed and the old unversioned api is used.
|
||||
* Source/NSURLHandle.m: Scheduling tweak.
|
||||
|
|
|
@ -340,8 +340,7 @@ typedef struct {
|
|||
if (policy == NSURLCacheStorageAllowed
|
||||
|| policy == NSURLCacheStorageAllowedInMemoryOnly)
|
||||
{
|
||||
|
||||
// FIXME ... cache response here
|
||||
// FIXME ... cache response here?
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -352,19 +351,23 @@ typedef struct {
|
|||
request = [_delegate connection: _parent
|
||||
willSendRequest: request
|
||||
redirectResponse: redirectResponse];
|
||||
// If we have been cancelled, our protocol will be nil
|
||||
if (_protocol != nil)
|
||||
if (this->_protocol == nil)
|
||||
{
|
||||
if (request == nil)
|
||||
{
|
||||
[_delegate connectionDidFinishLoading: _parent];
|
||||
}
|
||||
else
|
||||
{
|
||||
[_protocol stopLoading];
|
||||
DESTROY(_protocol);
|
||||
// FIXME start new request loading
|
||||
}
|
||||
/* Our protocol is nil, so we have been cancelled by the delegate.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
if (request != nil)
|
||||
{
|
||||
/* Follow the redirect ... stop the old load and start a new one.
|
||||
*/
|
||||
[_protocol stopLoading];
|
||||
DESTROY(this->_protocol);
|
||||
ASSIGNCOPY(this->_request, request);
|
||||
this->_protocol = [[NSURLProtocol alloc] initWithRequest: this->_request
|
||||
cachedResponse: nil
|
||||
client: this];
|
||||
[this->_protocol startLoading];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -754,6 +754,10 @@ static NSURLProtocol *placeholder = nil;
|
|||
|
||||
- (void) stream: (NSStream*) stream handleEvent: (NSStreamEvent) event
|
||||
{
|
||||
/* Make sure no action triggered by anything else destroys us prematurely.
|
||||
*/
|
||||
AUTORELEASE(RETAIN(self));
|
||||
|
||||
#if 0
|
||||
NSLog(@"stream: %@ handleEvent: %x for: %@", stream, event, self);
|
||||
#endif
|
||||
|
|
|
@ -354,13 +354,17 @@ typedef struct {
|
|||
static unsigned int
|
||||
_non_retained_id_hash(void *table, NSString* o)
|
||||
{
|
||||
return [[o uppercaseString] hash];
|
||||
return [[o lowercaseString] hash];
|
||||
}
|
||||
|
||||
static BOOL
|
||||
_non_retained_id_is_equal(void *table, NSString *o, NSString *p)
|
||||
{
|
||||
return ([o caseInsensitiveCompare: p] == NSOrderedSame) ? YES : NO;
|
||||
if (o == nil || [o caseInsensitiveCompare: p] != NSOrderedSame)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
typedef unsigned int (*NSMT_hash_func_t)(NSMapTable *, const void *);
|
||||
|
|
Loading…
Reference in a new issue