rv = nsHTTPConn::OK; memset(proxyURL, 0, kProxySrvrLen); wsprintf(proxyURL, "http:
if(connHTTP == NULL) { rv = DownloadViaProxyOpen(szUrl, szProxyServer, szProxyPort, szProxyUser, szProxyPasswd);
int DownloadViaProxy(char *szUrl, char *szProxyServer, char *szProxyPort, char *szProxyUser, char *szProxyPasswd){  int  rv;  char proxyURL[kProxySrvrLen];  char *file = NULL;  if((!szUrl) || (*szUrl == '\0'))    return nsHTTPConn::E_PARAM;  rv = nsHTTPConn::OK;  memset(proxyURL, 0, kProxySrvrLen);  wsprintf(proxyURL, "http://%s:%s", szProxyServer, szProxyPort);  nsHTTPConn *conn = new nsHTTPConn(proxyURL, ProcessWndMsgCB);  if(conn == NULL)  {    char szBuf[MAX_BUF_TINY];    GetPrivateProfileString("Strings", "Error Out Of Memory", "", szBuf, sizeof(szBuf), szFileIniConfig);    PrintError(szBuf, ERROR_CODE_HIDE);    return(WIZ_OUT_OF_MEMORY);  }  if((szProxyUser != NULL) && (*szProxyUser != '\0') &&     (szProxyPasswd != NULL) && (*szProxyPasswd != '\0'))    conn->SetProxyInfo(szUrl, szProxyUser, szProxyPasswd);  else    conn->SetProxyInfo(szUrl, NULL, NULL);  if((rv = conn->Open()) != WIZ_OK)    return(rv);  if(strrchr(szUrl, '/') != (szUrl + strlen(szUrl)))    file = strrchr(szUrl, '/') + 1; // set to leaf name  rv = conn->Get(ProgressCB, file); // use leaf from URL  conn->Close();  if(conn)    delete(conn);  return(rv);}