You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by bu...@apache.org on 2003/12/05 17:54:12 UTC
DO NOT REPLY [Bug 25249] New: -
BasicAuthenticatonExample.java in CVS
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25249>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25249
BasicAuthenticatonExample.java in CVS
Summary: BasicAuthenticatonExample.java in CVS
Product: Commons
Version: 2.0 Milestone 2
Platform: All
URL: http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-
commons/httpclient/src/examples/BasicAuthenticationExamp
le.java?content-type=text%2Fplain&rev=1.1.2.1
OS/Version: All
Status: NEW
Severity: Minor
Priority: Other
Component: HttpClient
AssignedTo: commons-httpclient-dev@jakarta.apache.org
ReportedBy: justingrammens@yahoo.com
>From the example in CVS Revision 1.1.2.1 the code below would lead you to
belive that setCredentials uses ("HOST", "REALM", credientials). It actually
should be ("REALM", "HOST", credientials). It looks like it was correct in the
Revision 1.1 and was changed with Revision 1.1.2.1
// pass our credentials to HttpClient, they will only be used for
// authenticating to servers with realm "realm", to authenticate agains
// an arbitrary realm change this to null.
client.getState().setCredentials(
"www.verisign.com",
"realm",
new UsernamePasswordCredentials("username", "password")
);
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org