Bug 165544 - let mozilla cope with broken socks 4 proxy servers

patch by jra@samba.org (Jeremy Allison), r=bbaetz, sr=darin
This commit is contained in:
bbaetz%student.usyd.edu.au 2002-09-02 00:36:36 +00:00
Родитель 45920105e5
Коммит e6c2850ef4
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -534,7 +534,9 @@ ConnectSOCKS4(PRFileDesc *fd, const PRNetAddr *addr, PRIntervalTime timeout)
return NS_ERROR_FAILURE;
}
if (response[0] != 0x00) {
if ((response[0] != 0x00) && (response[0] != 0x04)) {
// Novell BorderManager sends a response of type 4, should be zero
// According to the spec. Cope with this brokenness.
// it's not a SOCKS 4 reply or version 0 of the reply code
LOGERROR(("Not a SOCKS 4 reply. Expected: 0; received: %x.", response[0]));
return NS_ERROR_FAILURE;