mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Improve tunnelling error handling
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11346 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
20d333dfb3
commit
0771f6b448
1 changed files with 4 additions and 9 deletions
|
@ -210,11 +210,13 @@ static NSLock *urlLock = nil;
|
||||||
[dat appendData: d];
|
[dat appendData: d];
|
||||||
}
|
}
|
||||||
[p parse: dat];
|
[p parse: dat];
|
||||||
if ([p isInBody] == YES)
|
if ([p isInBody] == YES || [d length] == 0)
|
||||||
{
|
{
|
||||||
NSDictionary *info = [[p document] headerNamed: @"http"];
|
NSDictionary *info;
|
||||||
NSString *val;
|
NSString *val;
|
||||||
|
|
||||||
|
[p parse: nil];
|
||||||
|
info = [[p document] headerNamed: @"http"];
|
||||||
val = [info objectForKey: NSHTTPPropertyServerHTTPVersionKey];
|
val = [info objectForKey: NSHTTPPropertyServerHTTPVersionKey];
|
||||||
if (val != nil)
|
if (val != nil)
|
||||||
[pageInfo setObject: val forKey: NSHTTPPropertyServerHTTPVersionKey];
|
[pageInfo setObject: val forKey: NSHTTPPropertyServerHTTPVersionKey];
|
||||||
|
@ -230,13 +232,6 @@ static NSLock *urlLock = nil;
|
||||||
[dat setLength: 0];
|
[dat setLength: 0];
|
||||||
tunnel = NO;
|
tunnel = NO;
|
||||||
}
|
}
|
||||||
else if ([d length] == 0)
|
|
||||||
{
|
|
||||||
[nc removeObserver: self
|
|
||||||
name: NSFileHandleReadCompletionNotification
|
|
||||||
object: sock];
|
|
||||||
tunnel = NO;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[sock readInBackgroundAndNotify];
|
[sock readInBackgroundAndNotify];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue