public class HttpConfig
extends java.lang.Object
Config
. git provides for setting values for
specific URLs through "http.<url>.*" subsections. git always considers
only the initial original URL for such settings, not any redirected URL.Modifier and Type | Class and Description |
---|---|
static class |
HttpConfig.HttpRedirectMode
Config values for http.followRedirect.
|
Modifier and Type | Field and Description |
---|---|
private static int |
DEFAULT_MAX_REDIRECTS |
static java.lang.String |
FOLLOW_REDIRECTS_KEY
git config key for the "followRedirects" setting.
|
private HttpConfig.HttpRedirectMode |
followRedirects |
private static java.lang.String |
FTP |
static java.lang.String |
HTTP
git config section key for http settings.
|
private static org.slf4j.Logger |
LOG |
private static java.lang.String |
MAX_REDIRECT_SYSTEM_PROPERTY |
private static int |
MAX_REDIRECTS |
static java.lang.String |
MAX_REDIRECTS_KEY
git config key for the "maxRedirects" setting.
|
private int |
maxRedirects |
static java.lang.String |
POST_BUFFER_KEY
git config key for the "postBuffer" setting.
|
private int |
postBuffer |
static java.lang.String |
SSL_VERIFY_KEY
git config key for the "sslVerify" setting.
|
private boolean |
sslVerify |
Constructor and Description |
---|
HttpConfig(Config config,
URIish uri)
Creates a new
HttpConfig tailored to
the given URIish . |
HttpConfig(URIish uri)
Creates a
HttpConfig that reads values
solely from the user config. |
Modifier and Type | Method and Description |
---|---|
private boolean |
compare(java.lang.String a,
java.lang.String b) |
private int |
defaultedPort(int port,
java.lang.String scheme) |
private java.lang.String |
findMatch(java.util.Set<java.lang.String> names,
URIish uri)
Determines the best match from a set of subsection names (representing
prefix URLs) for the given
URIish . |
HttpConfig.HttpRedirectMode |
getFollowRedirects()
Get the "http.followRedirects" setting
|
int |
getMaxRedirects()
Get the "http.maxRedirects" setting
|
int |
getPostBuffer()
Get the "http.postBuffer" setting
|
private void |
init(Config config,
URIish uri) |
boolean |
isSslVerify()
Get the "http.sslVerify" setting
|
(package private) static java.lang.String |
normalize(java.lang.String path) |
(package private) static int |
segmentCompare(java.lang.String uriPath,
java.lang.String m) |
private static final org.slf4j.Logger LOG
private static final java.lang.String FTP
public static final java.lang.String HTTP
public static final java.lang.String FOLLOW_REDIRECTS_KEY
public static final java.lang.String MAX_REDIRECTS_KEY
public static final java.lang.String POST_BUFFER_KEY
public static final java.lang.String SSL_VERIFY_KEY
private static final java.lang.String MAX_REDIRECT_SYSTEM_PROPERTY
private static final int DEFAULT_MAX_REDIRECTS
private static final int MAX_REDIRECTS
private int postBuffer
private boolean sslVerify
private HttpConfig.HttpRedirectMode followRedirects
private int maxRedirects
public HttpConfig(Config config, URIish uri)
HttpConfig
tailored to
the given URIish
.config
- to read the HttpConfig
fromuri
- to get the configuration values forpublic HttpConfig(URIish uri)
HttpConfig
that reads values
solely from the user config.uri
- to get the configuration values forpublic int getPostBuffer()
public boolean isSslVerify()
public HttpConfig.HttpRedirectMode getFollowRedirects()
public int getMaxRedirects()
private java.lang.String findMatch(java.util.Set<java.lang.String> names, URIish uri)
URIish
.names
- to match against the uri
uri
- to find a match fornull
if no
subsection matchesprivate boolean compare(java.lang.String a, java.lang.String b)
private int defaultedPort(int port, java.lang.String scheme)
static int segmentCompare(java.lang.String uriPath, java.lang.String m)
static java.lang.String normalize(java.lang.String path)