Diff
Not logged in

Differences From:

File src/url.c part of check-in [676fdd088a] - Enable proxy support using the "fossil setting proxy" command. This check-in is made using a proxy. by drh on 2008-05-01 22:49:57. [view]

To:

File src/url.c part of check-in [387cbeda3f] - Honor the http_proxy environment variable as another source for the URL of the HTTP proxy if the "proxy" setting is undefined or is "off". by drh on 2008-05-05 17:30:12. [view]

@@ -131,11 +131,14 @@
 ** to the proxy server.
 */
 void url_enable_proxy(const char *zMsg){
   const char *zProxy = db_get("proxy", 0);
+  if( zProxy==0 || zProxy[0] || is_false(zProxy) ){
+    zProxy = getenv("http_proxy");
+  }
   if( zProxy && zProxy[0] && !is_false(zProxy) ){
     char *zOriginalUrl = g.urlCanonical;
     if( zMsg ) printf("%s%s\n", zMsg, zProxy);
     url_parse(zProxy);
     g.urlPath = zOriginalUrl;
   }
 }