diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java index 06a4eb6a7..770294cac 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java @@ -282,7 +282,7 @@ public void testListRemote_Dumb_NeedsAuth() throws Exception { fail("connection opened even info/refs needs auth basic"); } catch (TransportException err) { String exp = dumbAuthBasicURI + ": " - + JGitText.get().authenticationNotSupported; + + JGitText.get().notAuthorized; assertEquals(exp, err.getMessage()); } } finally { @@ -299,7 +299,7 @@ public void testListRemote_Smart_UploadPackNeedsAuth() throws Exception { fail("connection opened even though service disabled"); } catch (TransportException err) { String exp = smartAuthBasicURI + ": " - + JGitText.get().authenticationNotSupported; + + JGitText.get().notAuthorized; assertEquals(exp, err.getMessage()); } } finally { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java index 5a559abf1..11178fc72 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java @@ -85,9 +85,9 @@ static HttpAuthMethod scanResponse(HttpURLConnection conn) { return NONE; String type = hdr.substring(0, sp); - if (Basic.NAME.equals(type)) + if (Basic.NAME.equalsIgnoreCase(type)) return new Basic(); - else if (Digest.NAME.equals(type)) + else if (Digest.NAME.equalsIgnoreCase(type)) return new Digest(hdr.substring(sp + 1)); else return NONE;