mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
added option to ignore proxy settings
This commit is contained in:
@@ -206,6 +206,18 @@ public class HttpRequest
|
||||
return disableHostnameValidation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @since 1.17
|
||||
*/
|
||||
public boolean isIgnoreProxySettings()
|
||||
{
|
||||
return ignoreProxySettings;
|
||||
}
|
||||
|
||||
//~--- set methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
@@ -282,6 +294,18 @@ public class HttpRequest
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param ignoreProxySettings
|
||||
* @since 1.17
|
||||
*/
|
||||
public void setIgnoreProxySettings(boolean ignoreProxySettings)
|
||||
{
|
||||
this.ignoreProxySettings = ignoreProxySettings;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -326,6 +350,12 @@ public class HttpRequest
|
||||
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private Map<String, List<String>> headers;
|
||||
|
||||
/** Field description */
|
||||
private boolean ignoreProxySettings = false;
|
||||
|
||||
/** Field description */
|
||||
private boolean disableHostnameValidation = false;
|
||||
|
||||
@@ -335,9 +365,6 @@ public class HttpRequest
|
||||
/** Field description */
|
||||
private boolean decodeGZip = false;
|
||||
|
||||
/** Field description */
|
||||
private Map<String, List<String>> headers;
|
||||
|
||||
/** Field description */
|
||||
private Map<String, List<String>> parameters;
|
||||
|
||||
|
||||
@@ -523,7 +523,7 @@ public class URLHttpClient implements HttpClient
|
||||
{
|
||||
HttpURLConnection connection = null;
|
||||
|
||||
if (configuration.isEnableProxy())
|
||||
if (!request.isIgnoreProxySettings() && configuration.isEnableProxy())
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user