You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Gaurav Singhal (JIRA)" <ji...@apache.org> on 2011/02/09 11:49:57 UTC
[jira] Created: (HTTPCLIENT-1056) Wrong creation of AuthScope
object
Wrong creation of AuthScope object
----------------------------------
Key: HTTPCLIENT-1056
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1056
Project: HttpComponents HttpClient
Issue Type: Bug
Components: HttpClient
Affects Versions: 4.1 Final
Reporter: Gaurav Singhal
Class Name: org.apache.http.client.protocol.RequestAuthCache
Line #: 118-119
Issue: Want to create a new Object of AuthScope by passing host name, port and scheme name but due to incorrect constructor call, Getting a object with realm name as scheme name.
Current Code: Credentials creds = credsProvider.getCredentials(new AuthScope(host.getHostName(), host.getPort(), null, schemeName));
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
[jira] Commented: (HTTPCLIENT-1056) Wrong creation of AuthScope
object
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12992479#comment-12992479 ]
Oleg Kalnichevski commented on HTTPCLIENT-1056:
-----------------------------------------------
@Sebb
RequestAuthCache is a special case. In the most common scenario AuthScope is created by the user when adding credentials to a CredentialsProvider and at the point AuthScheme is simply not available. So, we cannot replace the AuthScope(String, int, String, String) constructor with AuthScope(Host, AuthScheme). One possibility could be to create AuthRealm class that is simply a wrapper around String.
Oleg
> Wrong creation of AuthScope object
> ----------------------------------
>
> Key: HTTPCLIENT-1056
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1056
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: 4.1 Final
> Reporter: Gaurav Singhal
> Labels: bug
> Fix For: 4.2 Final
>
>
> Class Name: org.apache.http.client.protocol.RequestAuthCache
> Line #: 118-119
> Issue: Want to create a new Object of AuthScope by passing host name, port and scheme name but due to incorrect constructor call, Getting a object with realm name as scheme name.
> Current Code: Credentials creds = credsProvider.getCredentials(new AuthScope(host.getHostName(), host.getPort(), null, schemeName));
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
[jira] Commented: (HTTPCLIENT-1056) Wrong creation of AuthScope
object
Posted by "Sebb (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12992433#comment-12992433 ]
Sebb commented on HTTPCLIENT-1056:
----------------------------------
Definitely looks wrong, but maybe it should be:
AuthScope(host.getHostName(), host.getPort(), authScheme.getRealm(), schemeName));
Seems to me it might be sensible to add a new ctor AuthScope(HttpHost, AuthScheme) and consider deprecating the ctors with multiple Strings.
> Wrong creation of AuthScope object
> ----------------------------------
>
> Key: HTTPCLIENT-1056
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1056
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: 4.1 Final
> Reporter: Gaurav Singhal
> Labels: bug
>
> Class Name: org.apache.http.client.protocol.RequestAuthCache
> Line #: 118-119
> Issue: Want to create a new Object of AuthScope by passing host name, port and scheme name but due to incorrect constructor call, Getting a object with realm name as scheme name.
> Current Code: Credentials creds = credsProvider.getCredentials(new AuthScope(host.getHostName(), host.getPort(), null, schemeName));
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
[jira] Updated: (HTTPCLIENT-1056) Wrong creation of AuthScope
object
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski updated HTTPCLIENT-1056:
------------------------------------------
Fix Version/s: 4.2 Final
Definitely a bug. *sigh*
Oleg
> Wrong creation of AuthScope object
> ----------------------------------
>
> Key: HTTPCLIENT-1056
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1056
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: 4.1 Final
> Reporter: Gaurav Singhal
> Labels: bug
> Fix For: 4.2 Final
>
>
> Class Name: org.apache.http.client.protocol.RequestAuthCache
> Line #: 118-119
> Issue: Want to create a new Object of AuthScope by passing host name, port and scheme name but due to incorrect constructor call, Getting a object with realm name as scheme name.
> Current Code: Credentials creds = credsProvider.getCredentials(new AuthScope(host.getHostName(), host.getPort(), null, schemeName));
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
[jira] Resolved: (HTTPCLIENT-1056) Wrong creation of AuthScope
object
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski resolved HTTPCLIENT-1056.
-------------------------------------------
Resolution: Fixed
@Gaurav
I committed a fix for the problem with the AuthScope generated by the RequestAuthCache when looking up credentials for preemptive authentication. Could you please re-test your application against the latest shapshot off SVN trunk?
Oleg
> Wrong creation of AuthScope object
> ----------------------------------
>
> Key: HTTPCLIENT-1056
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1056
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: 4.1 Final
> Reporter: Gaurav Singhal
> Labels: bug
> Fix For: 4.2 Final
>
>
> Class Name: org.apache.http.client.protocol.RequestAuthCache
> Line #: 118-119
> Issue: Want to create a new Object of AuthScope by passing host name, port and scheme name but due to incorrect constructor call, Getting a object with realm name as scheme name.
> Current Code: Credentials creds = credsProvider.getCredentials(new AuthScope(host.getHostName(), host.getPort(), null, schemeName));
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org