File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -411,7 +411,7 @@ CODESTARTdbgPrintInstInfo
411411 dbgprintf ("\trest path='%s'\n" , pData -> restPath );
412412 dbgprintf ("\tcheck path='%s'\n" , pData -> checkPath );
413413 dbgprintf ("\tdynamic rest path=%d\n" , pData -> dynRestPath );
414- dbgprintf ("\tproxy host='%s'\n" , pData -> proxyHost );
414+ dbgprintf ("\tproxy host='%s'\n" , ( pData -> proxyHost == NULL ) ? "unset" : ( char * ) pData -> proxyHost );
415415 dbgprintf ("\tproxy port='%d'\n" , pData -> proxyPort );
416416 dbgprintf ("\tuse https=%d\n" , pData -> useHttps );
417417 dbgprintf ("\tbatch=%d\n" , pData -> batchMode );
@@ -2180,10 +2180,12 @@ CODESTARTnewActInst
21802180 }
21812181
21822182 if (pData -> proxyHost == NULL ) {
2183- if (getenv ("http_proxy" ) != NULL ) {
2184- pData -> proxyHost = ustrdup (getenv ("http_proxy" ));
2185- } else if (getenv ("HTTP_PROXY" ) != NULL ) {
2186- pData -> proxyHost = ustrdup (getenv ("HTTP_PROXY" ));
2183+ const char * http_proxy ;
2184+ if ((http_proxy = getenv ("http_proxy" )) == NULL ) {
2185+ http_proxy = getenv ("HTTP_PROXY" );
2186+ }
2187+ if (http_proxy != NULL ) {
2188+ pData -> proxyHost = ustrdup (http_proxy );
21872189 }
21882190 }
21892191
You can’t perform that action at this time.
0 commit comments