Whoops. Yes it is reversed, and yes you are right it doesn't cater for the case where there is no HTTP proxy, but there is a SOCKS proxy. I haven't got a socks proxy ;-(
I think the following fixes it though:
rv = NS_ERROR_FAILURE; if (aScheme.LowerCaseEqualsLiteral("http") || useHttpProxyForAll) { rv = SetProxyResultFromGConf("/system/http_proxy/", "PROXY", aResult); } else if (aScheme.LowerCaseEqualsLiteral("https")) { rv = SetProxyResultFromGConf("/system/proxy/secure_", "PROXY", aResult); } else (aScheme.LowerCaseEqualsLiteral("ftp")) { rv = SetProxyResultFromGConf("/system/proxy/ftp_", "PROXY", aResult); } if (NS_FAILED(rv)) { rv = SetProxyResultFromGConf("/system/proxy/socks_", "SOCKS", aResult); }
Whoops. Yes it is reversed, and yes you are right it doesn't cater for the case where there is no HTTP proxy, but there is a SOCKS proxy. I haven't got a socks proxy ;-(
I think the following fixes it though:
rv = NS_ERROR_FAILURE; LowerCaseEquals Literal( "http") || useHttpProxyForAll) { romGConf( "/system/ http_proxy/ ", "PROXY", aResult); LowerCaseEquals Literal( "https" )) { romGConf( "/system/ proxy/secure_ ", "PROXY", aResult); LowerCaseEquals Literal( "ftp")) { romGConf( "/system/ proxy/ftp_ ", "PROXY", aResult); romGConf( "/system/ proxy/socks_ ", "SOCKS", aResult);
if (aScheme.
rv = SetProxyResultF
} else if (aScheme.
rv = SetProxyResultF
} else (aScheme.
rv = SetProxyResultF
}
if (NS_FAILED(rv)) {
rv = SetProxyResultF
}