Comment 6 for bug 801346

Revision history for this message
In , Ian-x8 (ian-x8) wrote :

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);
  }