Fossil SCM

Make proxy setting "system" by default to use http_proxy environment variable. Closer to old behavior and conform with most programs on Unix-like system.

mgagnon 2023-01-11 02:51 trunk
Commit 8f9f2cb7cd2e11b4be1fca90ae83d6cd35aecc263fecf05d7eea704fffd2392d
2 files changed +4 -3 +1 -1
+4 -3
--- src/db.c
+++ src/db.c
@@ -4455,13 +4455,14 @@
44554455
** SETTING: pgp-command width=40 sensitive
44564456
** Command used to clear-sign manifests at check-in.
44574457
** Default value is "gpg --clearsign -o"
44584458
*/
44594459
/*
4460
-** SETTING: proxy width=32 default=off
4461
-** URL of the HTTP proxy. If "system", the "http_proxy" environment variable is
4462
-** consulted. If undefined or "off", a direct HTTP connection is used.
4460
+** SETTING: proxy width=32 default=system
4461
+** URL of the HTTP proxy. If undefined or "system", the "http_proxy"
4462
+** environment variable is consulted. If "off", a direct HTTP connection is
4463
+** used.
44634464
*/
44644465
/*
44654466
** SETTING: redirect-to-https default=0 width=-1
44664467
** Specifies whether or not to redirect http:// requests to
44674468
** https:// URIs. A value of 0 (the default) means not to
44684469
--- src/db.c
+++ src/db.c
@@ -4455,13 +4455,14 @@
4455 ** SETTING: pgp-command width=40 sensitive
4456 ** Command used to clear-sign manifests at check-in.
4457 ** Default value is "gpg --clearsign -o"
4458 */
4459 /*
4460 ** SETTING: proxy width=32 default=off
4461 ** URL of the HTTP proxy. If "system", the "http_proxy" environment variable is
4462 ** consulted. If undefined or "off", a direct HTTP connection is used.
 
4463 */
4464 /*
4465 ** SETTING: redirect-to-https default=0 width=-1
4466 ** Specifies whether or not to redirect http:// requests to
4467 ** https:// URIs. A value of 0 (the default) means not to
4468
--- src/db.c
+++ src/db.c
@@ -4455,13 +4455,14 @@
4455 ** SETTING: pgp-command width=40 sensitive
4456 ** Command used to clear-sign manifests at check-in.
4457 ** Default value is "gpg --clearsign -o"
4458 */
4459 /*
4460 ** SETTING: proxy width=32 default=system
4461 ** URL of the HTTP proxy. If undefined or "system", the "http_proxy"
4462 ** environment variable is consulted. If "off", a direct HTTP connection is
4463 ** used.
4464 */
4465 /*
4466 ** SETTING: redirect-to-https default=0 width=-1
4467 ** Specifies whether or not to redirect http:// requests to
4468 ** https:// URIs. A value of 0 (the default) means not to
4469
+1 -1
--- src/url.c
+++ src/url.c
@@ -560,11 +560,11 @@
560560
*/
561561
void url_enable_proxy(const char *zMsg){
562562
const char *zProxy;
563563
zProxy = zProxyOpt;
564564
if( zProxy==0 ){
565
- zProxy = db_get("proxy", 0);
565
+ zProxy = db_get("proxy", "system");
566566
if( fossil_strcmp(zProxy, "system")==0 ){
567567
zProxy = fossil_getenv("http_proxy");
568568
}
569569
}
570570
if( zProxy && zProxy[0] && !is_false(zProxy)
571571
--- src/url.c
+++ src/url.c
@@ -560,11 +560,11 @@
560 */
561 void url_enable_proxy(const char *zMsg){
562 const char *zProxy;
563 zProxy = zProxyOpt;
564 if( zProxy==0 ){
565 zProxy = db_get("proxy", 0);
566 if( fossil_strcmp(zProxy, "system")==0 ){
567 zProxy = fossil_getenv("http_proxy");
568 }
569 }
570 if( zProxy && zProxy[0] && !is_false(zProxy)
571
--- src/url.c
+++ src/url.c
@@ -560,11 +560,11 @@
560 */
561 void url_enable_proxy(const char *zMsg){
562 const char *zProxy;
563 zProxy = zProxyOpt;
564 if( zProxy==0 ){
565 zProxy = db_get("proxy", "system");
566 if( fossil_strcmp(zProxy, "system")==0 ){
567 zProxy = fossil_getenv("http_proxy");
568 }
569 }
570 if( zProxy && zProxy[0] && !is_false(zProxy)
571

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button