@ -483,6 +483,18 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
this . headers = headers ;
this . headers = headers ;
}
}
private NoRemoteRepositoryException createNotFoundException ( URIish u ,
URL url , String msg ) {
String text ;
if ( msg ! = null & & ! msg . isEmpty ( ) ) {
text = MessageFormat . format ( JGitText . get ( ) . uriNotFoundWithMessage ,
url , msg ) ;
} else {
text = MessageFormat . format ( JGitText . get ( ) . uriNotFound , url ) ;
}
return new NoRemoteRepositoryException ( u , text ) ;
}
private HttpConnection connect ( String service )
private HttpConnection connect ( String service )
throws TransportException , NotSupportedException {
throws TransportException , NotSupportedException {
URL u = getServiceURL ( service ) ;
URL u = getServiceURL ( service ) ;
@ -511,8 +523,8 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
return conn ;
return conn ;
case HttpConnection . HTTP_NOT_FOUND :
case HttpConnection . HTTP_NOT_FOUND :
throw new NoRemoteRepositoryException ( uri ,
throw createNotFoundException ( uri , u ,
MessageFormat . format ( JGitText . get ( ) . uriNotFound , u ) ) ;
conn . getResponseMessage ( ) ) ;
case HttpConnection . HTTP_UNAUTHORIZED :
case HttpConnection . HTTP_UNAUTHORIZED :
authMethod = HttpAuthMethod . scanResponse ( conn , ignoreTypes ) ;
authMethod = HttpAuthMethod . scanResponse ( conn , ignoreTypes ) ;
@ -1180,9 +1192,8 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
return ;
return ;
case HttpConnection . HTTP_NOT_FOUND :
case HttpConnection . HTTP_NOT_FOUND :
throw new NoRemoteRepositoryException ( uri ,
throw createNotFoundException ( uri , conn . getURL ( ) ,
MessageFormat . format ( JGitText . get ( ) . uriNotFound ,
conn . getResponseMessage ( ) ) ;
conn . getURL ( ) ) ) ;
case HttpConnection . HTTP_FORBIDDEN :
case HttpConnection . HTTP_FORBIDDEN :
throw new TransportException ( uri ,
throw new TransportException ( uri ,