[
https://issues.apache.org/jira/browse/HTTPCLIENT-1748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15369644#comment-15369644
]
ASF GitHub Bot commented on HTTPCLIENT-1748:
--------------------------------------------
GitHub user sebastiencaille opened a pull request:
https://github.com/apache/httpclient/pull/55
HTTPCLIENT-1748: fix for trunk
Hello,
as discussed before, here is a patch proposal for the trunk.
(I added a basic test case)
Cheers
Sébastien
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sebastiencaille/httpclient trunk
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/httpclient/pull/55.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #55
----
commit 88ea39b476faf777fa2c01e4cb198a67927542e1
Author: Sebastien Caille <[email protected]>
Date: 2016-06-24T15:11:34Z
HTTPCLIENT-1748: fixed proxy hostname so authentication works with java
applets (started from firefox)
commit 7a87b59e9c20f443e3123425567153204e831453
Author: Sebastien Caille <[email protected]>
Date: 2016-06-24T15:19:36Z
HTTPCLIENT-1748: improved creation of proxy's HttpHost
commit f01cfa4bc82a0b73a723ed5d8fb3b0c5a05f071e
Author: Sebastien Caille <[email protected]>
Date: 2016-07-03T12:50:29Z
HTTPCLIENT-1748: fix for proxy authentication issue / trunk
----
> When run in java applet, SystemDefaultCredentialsProvider fails to get
> authentication from Authenticator
> --------------------------------------------------------------------------------------------------------
>
> Key: HTTPCLIENT-1748
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1748
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: 4.5
> Environment: Windows, application running in a java applet started by
> firefox, connection to a remote server via a squid proxy with basic
> authentication
> Reporter: Sébastien Caille
> Priority: Trivial
>
> Hello,
> The java applets are deprecated, but the issue may impact other use cases.
> During a POST call made from a java applet via a proxy server with basic
> authentication, SystemDefaultCredentialsProvider.getSystemCreds(...) calls
> Authenticator.requestPasswordAuthentication, which wrongly returns "null"
> authentication.
> The java applet console shows that a NullPointerException was ignored.
> I managed to fix the issue by providing the following values to
> Authenticator.requestPasswordAuthentication (getSystemCreds is currently
> providing null for those ones ):
> prompt = authscope.getRealm()
> url = context.getAttribute(HttpClientContext.HTTP_TARGET_HOST)
> Both values are needed ( prompt == null && url != null -> dialog box asking
> for credentials, prompt != null && url == null -> crashes firefox)
> Note that when downloading the applet jar files, the java is providing values
> for all the parameters of Authenticator.requestPasswordAuthentication
> (according to a breakpoint in requestPasswordAuthentication).
> Thanks
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]