mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 01:21:08 +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
6f5cfff5a5
commit
cb42f0bb8f
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>
|
2007-05-14 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/Additions/Unicode.m:
|
* Source/Additions/Unicode.m:
|
||||||
|
@ -63,7 +70,7 @@
|
||||||
|
|
||||||
2007-04-27 Richard Frith-Macdonald <rfm@gnu.org>
|
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
|
resource lookup to find correct version when multiple versions of
|
||||||
the base library are installed and the old unversioned api is used.
|
the base library are installed and the old unversioned api is used.
|
||||||
* Source/NSURLHandle.m: Scheduling tweak.
|
* Source/NSURLHandle.m: Scheduling tweak.
|
||||||
|
|
|
@ -340,8 +340,7 @@ typedef struct {
|
||||||
if (policy == NSURLCacheStorageAllowed
|
if (policy == NSURLCacheStorageAllowed
|
||||||
|| policy == NSURLCacheStorageAllowedInMemoryOnly)
|
|| policy == NSURLCacheStorageAllowedInMemoryOnly)
|
||||||
{
|
{
|
||||||
|
// FIXME ... cache response here?
|
||||||
// FIXME ... cache response here
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,19 +351,23 @@ typedef struct {
|
||||||
request = [_delegate connection: _parent
|
request = [_delegate connection: _parent
|
||||||
willSendRequest: request
|
willSendRequest: request
|
||||||
redirectResponse: redirectResponse];
|
redirectResponse: redirectResponse];
|
||||||
// If we have been cancelled, our protocol will be nil
|
if (this->_protocol == nil)
|
||||||
if (_protocol != nil)
|
|
||||||
{
|
{
|
||||||
if (request == nil)
|
/* Our protocol is nil, so we have been cancelled by the delegate.
|
||||||
{
|
*/
|
||||||
[_delegate connectionDidFinishLoading: _parent];
|
return;
|
||||||
}
|
}
|
||||||
else
|
if (request != nil)
|
||||||
{
|
{
|
||||||
|
/* Follow the redirect ... stop the old load and start a new one.
|
||||||
|
*/
|
||||||
[_protocol stopLoading];
|
[_protocol stopLoading];
|
||||||
DESTROY(_protocol);
|
DESTROY(this->_protocol);
|
||||||
// FIXME start new request loading
|
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
|
- (void) stream: (NSStream*) stream handleEvent: (NSStreamEvent) event
|
||||||
{
|
{
|
||||||
|
/* Make sure no action triggered by anything else destroys us prematurely.
|
||||||
|
*/
|
||||||
|
AUTORELEASE(RETAIN(self));
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
NSLog(@"stream: %@ handleEvent: %x for: %@", stream, event, self);
|
NSLog(@"stream: %@ handleEvent: %x for: %@", stream, event, self);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -354,13 +354,17 @@ typedef struct {
|
||||||
static unsigned int
|
static unsigned int
|
||||||
_non_retained_id_hash(void *table, NSString* o)
|
_non_retained_id_hash(void *table, NSString* o)
|
||||||
{
|
{
|
||||||
return [[o uppercaseString] hash];
|
return [[o lowercaseString] hash];
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL
|
static BOOL
|
||||||
_non_retained_id_is_equal(void *table, NSString *o, NSString *p)
|
_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 *);
|
typedef unsigned int (*NSMT_hash_func_t)(NSMapTable *, const void *);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue