3b7af84b7d8ebe9d30811103accd61584add9d9a galt Sun Mar 19 22:24:29 2017 -0700 Initial check-in of proxy stuff. Added support for https_proxy for configuring https proxy. Added no_proxy for configuring domain suffixes which should be excluded from proxying. src/product/README.proxy updated. There are probably some documentation pages that will still need updating. diff --git src/hg/lib/cart.c src/hg/lib/cart.c index 486c85d..63dc364 100644 --- src/hg/lib/cart.c +++ src/hg/lib/cart.c @@ -1599,33 +1599,41 @@ for (sl = newCookies; sl != NULL; sl = sl->next) printf("Set-Cookie: %s\r\n", sl->name); } } struct cart *cartForSession(char *cookieName, char **exclude, struct hash *oldVars) /* This gets the cart without writing any HTTP lines at all to stdout. */ { char *hguid = getCookieId(cookieName); char *hgsid = getSessionId(); struct cart *cart = cartNew(hguid, hgsid, exclude, oldVars); cartExclude(cart, sessionVar); if (sameOk(cfgOption("signalsHandler"), "on")) /* most cgis call this routine */ initSigHandlers(hDumpStackEnabled()); -char *httpProxy = cfgOption("httpProxy"); /* most cgis call this routine */ +/* most cgis call this routine */ +/* net.c cannot see the cart, pass the value through env var */ +char *httpProxy = cfgOption("httpProxy"); if (httpProxy) - setenv("http_proxy", httpProxy, TRUE); /* net.c cannot see the cart, pass the value through env var */ + setenv("http_proxy", httpProxy, TRUE); +char *httpsProxy = cfgOption("httpsProxy"); +if (httpsProxy) + setenv("https_proxy", httpsProxy, TRUE); +char *noProxy = cfgOption("no_proxy"); +if (noProxy) + setenv("no_proxy", noProxy, TRUE); return cart; } struct cart *cartAndCookieWithHtml(char *cookieName, char **exclude, struct hash *oldVars, boolean doContentType) /* Load cart from cookie and session cgi variable. Write cookie * and optionally content-type part HTTP preamble to web page. Don't * write any HTML though. */ { // Note: early abort works fine but early warn does not htmlPushEarlyHandlers(); struct cart *cart = cartForSession(cookieName, exclude, oldVars); popWarnHandler(); popAbortHandler();