src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AuthenticationFilter.java
changeset 48083 b1c1b4ef4be2
parent 47216 71c04702a3d5
child 55973 4d9b002587db
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AuthenticationFilter.java	Fri Nov 03 10:01:08 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AuthenticationFilter.java	Wed Dec 06 11:11:59 2017 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,6 +54,9 @@
     static final int UNAUTHORIZED = 401;
     static final int PROXY_UNAUTHORIZED = 407;
 
+    // A public no-arg constructor is required by FilterFactory
+    public AuthenticationFilter() {}
+
     private PasswordAuthentication getCredentials(String header,
                                                   boolean proxy,
                                                   HttpRequestImpl req)
@@ -83,7 +86,7 @@
     }
 
     private URI getProxyURI(HttpRequestImpl r) {
-        InetSocketAddress proxy = r.proxy(exchange.client());
+        InetSocketAddress proxy = r.proxy();
         if (proxy == null) {
             return null;
         }
@@ -216,7 +219,6 @@
             return null;   // error gets returned to app
         }
 
-        String realm = parser.findValue("realm");
         AuthInfo au = proxy ? exchange.proxyauth : exchange.serverauth;
         if (au == null) {
             PasswordAuthentication pw = getCredentials(authval, proxy, req);