Minor mime unparsing fixes and fix to stop socks being used for the local host.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13918 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-06-19 11:29:49 +00:00
parent 965d1bb86b
commit 9f124f25ee
4 changed files with 262 additions and 112 deletions

View file

@ -706,6 +706,19 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
}
[self setAddr: &sin]; // Store the address of the remote end.
/*
* Don't use SOCKS if we are contancting the local host.
*/
if (shost != nil)
{
NSHost *remote = [NSHost hostWithAddress: [self socketAddress]];
NSHost *local = [NSHost currentHost];
if ([remote isEqual: local] || [remote isEqual: [NSHost localHost]])
{
shost = nil;
}
}
if (shost != nil)
{
if (getAddr(shost, sport, p, &sin) == NO)