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.
Commit
a242bb727ec0a7c28eb590fa1b10d19a39f22709c4bebb13aa9a609a3b1a48f5
Parent
5605aef9b968e65…
2 files changed
+2
-4
+1
-1
M
src/db.c
+2
-4
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -4368,14 +4368,12 @@ | ||
| 4368 | 4368 | ** which will cause the client to avoid generating a delta |
| 4369 | 4369 | ** manifest. |
| 4370 | 4370 | */ |
| 4371 | 4371 | /* |
| 4372 | 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. | |
| 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. | |
| 4377 | 4375 | */ |
| 4378 | 4376 | /* |
| 4379 | 4377 | ** SETTING: redirect-to-https default=0 width=-1 |
| 4380 | 4378 | ** Specifies whether or not to redirect http:// requests to |
| 4381 | 4379 | ** https:// URIs. A value of 0 (the default) means not to |
| 4382 | 4380 |
| --- 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 @@ | ||
| 535 | 535 | void url_enable_proxy(const char *zMsg){ |
| 536 | 536 | const char *zProxy; |
| 537 | 537 | zProxy = zProxyOpt; |
| 538 | 538 | if( zProxy==0 ){ |
| 539 | 539 | zProxy = db_get("proxy", 0); |
| 540 | - if( zProxy==0 || zProxy[0]==0 || is_false(zProxy) ){ | |
| 540 | + if( fossil_strcmp(zProxy, "system")==0 ){ | |
| 541 | 541 | zProxy = fossil_getenv("http_proxy"); |
| 542 | 542 | } |
| 543 | 543 | } |
| 544 | 544 | if( zProxy && zProxy[0] && !is_false(zProxy) |
| 545 | 545 | && !g.url.isSsh && !g.url.isFile ){ |
| 546 | 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( 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 |