Fossil

Check-in [387cbeda]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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".
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 387cbeda3f269ff686b5a7f08ede95fe85f430e5
User & Date: drh 2008-05-05 17:30:12
Context
2008-05-05
18:39
Fix the fossil repository URL in the quickstart.html document. check-in: c7438f6d user: drh tags: trunk
17:30
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". check-in: 387cbeda user: drh tags: trunk
17:24
Add the ability to modify global settings (such as the proxy setting) even when there are no repositories defined. check-in: 4e683ef0 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/db.c.

1084
1085
1086
1087
1088
1089
1090
1091



1092
1093
1094
1095
1096
1097
1098
**                     127.0.0.1 be authenticated by password.  If
**                     false, all HTTP requests from localhost have
**                     unrestricted access to the repository.
**
**    omitsign         When enabled, fossil will not attempt to sign any
**                     commit with gpg. All commits will be unsigned.
**
**    proxy            URL of the HTTP proxy to use



**
**    diff-command     External command to run when performing a diff.
**                     If undefined, the internal text diff will be used.
**
**    gdiff-command    External command to run when performing a graphical
**                     diff. If undefined, text diff will be used.
*/







|
>
>
>







1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
**                     127.0.0.1 be authenticated by password.  If
**                     false, all HTTP requests from localhost have
**                     unrestricted access to the repository.
**
**    omitsign         When enabled, fossil will not attempt to sign any
**                     commit with gpg. All commits will be unsigned.
**
**    proxy            URL of the HTTP proxy.  If undefined or "off" then
**                     the "http_proxy" environment variable is consulted.
**                     If the http_proxy environment variable is undefined
**                     then a direct HTTP connection is used.
**
**    diff-command     External command to run when performing a diff.
**                     If undefined, the internal text diff will be used.
**
**    gdiff-command    External command to run when performing a graphical
**                     diff. If undefined, text diff will be used.
*/

Changes to src/url.c.

128
129
130
131
132
133
134



135
136
137
138
139
140
141

/*
** If the "proxy" setting is defined, then change the URL to refer
** to the proxy server.
*/
void url_enable_proxy(const char *zMsg){
  const char *zProxy = db_get("proxy", 0);



  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;
  }
}







>
>
>







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144

/*
** If the "proxy" setting is defined, then change the URL to refer
** 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;
  }
}