Fossil SCM

Only use the "http_proxy" environment variable if it is set to "system", if unset or set to "off", always use direct http connection.

mgagnon 2022-05-11 15:34 fix_remote_url_overwrite_with_proxy
Commit a242bb727ec0a7c28eb590fa1b10d19a39f22709c4bebb13aa9a609a3b1a48f5
2 files changed +2 -4 +1 -1
+2 -4
--- src/db.c
+++ src/db.c
@@ -4368,14 +4368,12 @@
43684368
** which will cause the client to avoid generating a delta
43694369
** manifest.
43704370
*/
43714371
/*
43724372
** SETTING: proxy width=32 default=off
4373
-** URL of the HTTP proxy. If undefined or "off" then
4374
-** the "http_proxy" environment variable is consulted.
4375
-** If the http_proxy environment variable is undefined
4376
-** then a direct HTTP connection is used.
4373
+** URL of the HTTP proxy. If "system", the "http_proxy" environment variable is
4374
+** consulted. If undefined or "off", a direct HTTP connection is used.
43774375
*/
43784376
/*
43794377
** SETTING: redirect-to-https default=0 width=-1
43804378
** Specifies whether or not to redirect http:// requests to
43814379
** https:// URIs. A value of 0 (the default) means not to
43824380
--- src/db.c
+++ src/db.c
@@ -4368,14 +4368,12 @@
4368 ** which will cause the client to avoid generating a delta
4369 ** manifest.
4370 */
4371 /*
4372 ** SETTING: proxy width=32 default=off
4373 ** URL of the HTTP proxy. If undefined or "off" then
4374 ** the "http_proxy" environment variable is consulted.
4375 ** If the http_proxy environment variable is undefined
4376 ** then a direct HTTP connection is used.
4377 */
4378 /*
4379 ** SETTING: redirect-to-https default=0 width=-1
4380 ** Specifies whether or not to redirect http:// requests to
4381 ** https:// URIs. A value of 0 (the default) means not to
4382
--- src/db.c
+++ src/db.c
@@ -4368,14 +4368,12 @@
4368 ** which will cause the client to avoid generating a delta
4369 ** manifest.
4370 */
4371 /*
4372 ** SETTING: proxy width=32 default=off
4373 ** URL of the HTTP proxy. If "system", the "http_proxy" environment variable is
4374 ** consulted. If undefined or "off", a direct HTTP connection is used.
 
 
4375 */
4376 /*
4377 ** SETTING: redirect-to-https default=0 width=-1
4378 ** Specifies whether or not to redirect http:// requests to
4379 ** https:// URIs. A value of 0 (the default) means not to
4380
+1 -1
--- src/url.c
+++ src/url.c
@@ -535,11 +535,11 @@
535535
void url_enable_proxy(const char *zMsg){
536536
const char *zProxy;
537537
zProxy = zProxyOpt;
538538
if( zProxy==0 ){
539539
zProxy = db_get("proxy", 0);
540
- if( zProxy==0 || zProxy[0]==0 || is_false(zProxy) ){
540
+ if( fossil_strcmp(zProxy, "system")==0 ){
541541
zProxy = fossil_getenv("http_proxy");
542542
}
543543
}
544544
if( zProxy && zProxy[0] && !is_false(zProxy)
545545
&& !g.url.isSsh && !g.url.isFile ){
546546
--- src/url.c
+++ src/url.c
@@ -535,11 +535,11 @@
535 void url_enable_proxy(const char *zMsg){
536 const char *zProxy;
537 zProxy = zProxyOpt;
538 if( zProxy==0 ){
539 zProxy = db_get("proxy", 0);
540 if( zProxy==0 || zProxy[0]==0 || is_false(zProxy) ){
541 zProxy = fossil_getenv("http_proxy");
542 }
543 }
544 if( zProxy && zProxy[0] && !is_false(zProxy)
545 && !g.url.isSsh && !g.url.isFile ){
546
--- src/url.c
+++ src/url.c
@@ -535,11 +535,11 @@
535 void url_enable_proxy(const char *zMsg){
536 const char *zProxy;
537 zProxy = zProxyOpt;
538 if( zProxy==0 ){
539 zProxy = db_get("proxy", 0);
540 if( fossil_strcmp(zProxy, "system")==0 ){
541 zProxy = fossil_getenv("http_proxy");
542 }
543 }
544 if( zProxy && zProxy[0] && !is_false(zProxy)
545 && !g.url.isSsh && !g.url.isFile ){
546

Keyboard Shortcuts

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