equal
deleted
inserted
replaced
1541 * after receiving a 407 error. In the case of NTLM however, |
1541 * after receiving a 407 error. In the case of NTLM however, |
1542 * receiving a 407 is normal and we just skip the stale check |
1542 * receiving a 407 is normal and we just skip the stale check |
1543 * because ntlm does not support this feature. |
1543 * because ntlm does not support this feature. |
1544 */ |
1544 */ |
1545 private AuthenticationInfo |
1545 private AuthenticationInfo |
1546 resetProxyAuthentication(AuthenticationInfo proxyAuthentication, AuthenticationHeader auth) { |
1546 resetProxyAuthentication(AuthenticationInfo proxyAuthentication, AuthenticationHeader auth) throws IOException { |
1547 if ((proxyAuthentication != null )&& |
1547 if ((proxyAuthentication != null )&& |
1548 proxyAuthentication.getAuthScheme() != NTLM) { |
1548 proxyAuthentication.getAuthScheme() != NTLM) { |
1549 String raw = auth.raw(); |
1549 String raw = auth.raw(); |
1550 if (proxyAuthentication.isAuthorizationStale (raw)) { |
1550 if (proxyAuthentication.isAuthorizationStale (raw)) { |
1551 /* we can retry with the current credentials */ |
1551 /* we can retry with the current credentials */ |
1765 } |
1765 } |
1766 |
1766 |
1767 /** |
1767 /** |
1768 * Sets pre-emptive proxy authentication in header |
1768 * Sets pre-emptive proxy authentication in header |
1769 */ |
1769 */ |
1770 private void setPreemptiveProxyAuthentication(MessageHeader requests) { |
1770 private void setPreemptiveProxyAuthentication(MessageHeader requests) throws IOException { |
1771 AuthenticationInfo pauth |
1771 AuthenticationInfo pauth |
1772 = AuthenticationInfo.getProxyAuth(http.getProxyHostUsed(), |
1772 = AuthenticationInfo.getProxyAuth(http.getProxyHostUsed(), |
1773 http.getProxyPortUsed()); |
1773 http.getProxyPortUsed()); |
1774 if (pauth != null && pauth.supportsPreemptiveAuthorization()) { |
1774 if (pauth != null && pauth.supportsPreemptiveAuthorization()) { |
1775 String value; |
1775 String value; |
2121 * Also, needed for digest authentication |
2121 * Also, needed for digest authentication |
2122 */ |
2122 */ |
2123 |
2123 |
2124 String requestURI = null; |
2124 String requestURI = null; |
2125 |
2125 |
2126 String getRequestURI() { |
2126 String getRequestURI() throws IOException { |
2127 if (requestURI == null) { |
2127 if (requestURI == null) { |
2128 try { |
2128 requestURI = http.getURLFile(); |
2129 requestURI = http.getURLFile(); |
|
2130 } catch (IOException e) { |
|
2131 requestURI = ""; |
|
2132 } |
|
2133 } |
2129 } |
2134 return requestURI; |
2130 return requestURI; |
2135 } |
2131 } |
2136 |
2132 |
2137 /* Tells us whether to follow a redirect. If so, it |
2133 /* Tells us whether to follow a redirect. If so, it |