hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 25249] New: - BasicAuthenticatonExample.java in CVS
Date Fri, 05 Dec 2003 16:54:12 GMT
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


Mime
View raw message