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:
rfm 2007-05-14 09:46:53 +00:00
parent 6f5cfff5a5
commit cb42f0bb8f
4 changed files with 35 additions and 17 deletions

View file

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