hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HTTPCLIENT-1524) authentication error: missing realm in challenge
Date Mon, 30 Jun 2014 11:59:25 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oleg Kalnichevski resolved HTTPCLIENT-1524.
-------------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.4 Alpha2
                   4.3.5

Fixed in SVN trunk and 4.3.x. Please review / re-test.

Oleg

> authentication error: missing realm in challenge
> ------------------------------------------------
>
>                 Key: HTTPCLIENT-1524
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1524
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.3.4
>            Reporter: Yuji Tagawa
>             Fix For: 4.3.5, 4.4 Alpha2
>
>
> I use HttpClient 4.3.4 and will pass the proxy with DIGEST Authentication.
> But AuthenticationException("missing realm in challenge") was thrown
> in org.apache.http.impl.auth.DigestScheme#authenticate.
> I research HTTP Header from Proxy Server.
> 2014/06/26 14:43:12:691 GMT+09:00 [DEBUG] headers - http-outgoing-3 <<
> Proxy-Authenticate: Digest Realm="-", nonce="YjYuNGYyYmJhMzUuY2I5ZDhlZDE5M2ZlZDM
> 1Mjk3NGJkNTIyYjgyNTcwMjQ=", opaque="98700A3D9CE17065E2246B41035C6609", qop="auth
> The keyword is "Realm".
> FIrst character is UpperCase.
> I research source code of org.apache.http.impl.auth.RFC2617Schem.java.
> Then
>   protected void parseChallenge(final CharArrayBuffer buffer,
>     final int pos, final int len) {
>       ...
>       this.params.put(element.getName(), element.getValue());
>   }
>   public String getParameter(final String name) {
>     ...
>     return this.params.get(name.toLowerCase(Locale.ENGLISH));
>   }
> In my case, put the name by UpperCase and get by LowerCase.
> So AuthenticationException happens.
> Probably in parseChallenge()
> this.params.put(element.getName().toLowerCase(Locale.ENGLIEH), element.getValue());
> is correct.
> #HttpClient 3.x is correct.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message