mirror of https://github.com/apache/maven.git
be more forceful on the no-cache
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163958 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d3c5de773f
commit
e2c9a495e7
|
@ -67,8 +67,7 @@ public class HttpUtils
|
|||
{
|
||||
protected PasswordAuthentication getPasswordAuthentication()
|
||||
{
|
||||
return new PasswordAuthentication( proxyUserName,
|
||||
proxyPassword == null
|
||||
return new PasswordAuthentication( proxyUserName, proxyPassword == null
|
||||
? new char[0] : proxyPassword.toCharArray() );
|
||||
}
|
||||
} );
|
||||
|
@ -210,7 +209,7 @@ public class HttpUtils
|
|||
connection.setRequestProperty( "Authorization", "Basic " + encoding );
|
||||
}
|
||||
|
||||
connection.setUseCaches( false );
|
||||
connection.setRequestProperty( "Pragma", "no-cache" );
|
||||
|
||||
//connect to the remote site (may take some time)
|
||||
connection.connect();
|
||||
|
@ -223,10 +222,9 @@ public class HttpUtils
|
|||
// test for 404 ourselves, and throw FileNotFoundException as needed
|
||||
if ( httpConnection.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND )
|
||||
{
|
||||
throw new FileNotFoundException(
|
||||
url.toString() + " (HTTP Error: " + httpConnection.getResponseCode() + " " +
|
||||
httpConnection.getResponseMessage() +
|
||||
")" );
|
||||
throw new FileNotFoundException( url.toString() + " (HTTP Error: " + httpConnection.getResponseCode() +
|
||||
" " +
|
||||
httpConnection.getResponseMessage() + ")" );
|
||||
}
|
||||
if ( httpConnection.getResponseCode() == HttpURLConnection.HTTP_NOT_MODIFIED )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue