ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Macks (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IVY-1336) HTTP issue: Basic authentication is stuck in 401 loop
Date Wed, 29 Aug 2012 23:05:07 GMT

    [ https://issues.apache.org/jira/browse/IVY-1336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444512#comment-13444512
] 

Andrew Macks commented on IVY-1336:
-----------------------------------

I did some deeper investigation in this and found the disturbing problem.

Issue is between ivy and its use of commons-httpclient.

Basically, when commons-httpclient encounters a 401, it asks credentials store for credentials
again.  In Ivy's implementation of credentials store, it responds with stored credentials
each time, therefore, they are both facilitating this loop.

I have made a patch against commons-httpclient to add a variable to avoid auth reattempt,
however as commons-httpclient is now deprecated, there's no chance this will get into upstream.

What's the plan for ivy and usage of commons-httpclient in future?  Is there work going on
to switch to new httpclient 4.x?
                
> HTTP issue: Basic authentication is stuck in 401 loop
> -----------------------------------------------------
>
>                 Key: IVY-1336
>                 URL: https://issues.apache.org/jira/browse/IVY-1336
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2.0
>            Reporter: Elias Ross
>
> Debug log (using log4j).
> Using commons-httpclient-3.1.jar as well.
> [ivy:resolve] 19:06:51,777 DEBUG [HttpMethodDirector] Authorization required
> [ivy:resolve] 19:06:51,777 DEBUG [AuthChallengeProcessor] Using authentication scheme:
basic
> [ivy:resolve] 19:06:51,777 DEBUG [AuthChallengeProcessor] Authorization challenge processed
> [ivy:resolve] 19:06:51,777 DEBUG [HttpMethodDirector] Authentication scope: BASIC 'Artifactory
Realm'@iadbuild.apple.com:443
> [ivy:resolve] 19:06:51,778 DEBUG [HttpMethodDirector] Credentials required
> [ivy:resolve] 19:06:51,778 DEBUG [HttpMethodDirector] BASIC 'Artifactory Realm'@iadbuild.apple.com:443
new credentials given
> [ivy:resolve] 19:06:51,778 DEBUG [HttpMethodDirector] Retry authentication
> [ivy:resolve] 19:06:51,778 DEBUG [HttpMethodDirector] Authenticating with BASIC 'Artifactory
Realm'@iadbuild.apple.com:443
> [ivy:resolve] 19:06:51,778 DEBUG [HttpMethodParams] Credential charset not configured,
using HTTP element charset
> [ivy:resolve] 19:06:51,778 DEBUG [HttpConnection] Open connection to iadbuild.apple.com:443
> [ivy:resolve] 19:06:51,943 DEBUG [header] >> "HEAD /artifactory/repo/com/google/guava/guava/r09/guava-r09.pom
HTTP/1.1[\r][\n]"
> [ivy:resolve] 19:06:51,943 DEBUG [HttpMethodBase] Adding Host request header
> [ivy:resolve] 19:06:51,943 DEBUG [header] >> "User-Agent: Apache Ivy/2.2.0[\r][\n]"
> [ivy:resolve] 19:06:51,943 DEBUG [header] >> "Authorization: Basic ZWxpYXNfcm9zczpudWxs[\r][\n]"
> [ivy:resolve] 19:06:51,944 DEBUG [header] >> "Host: iadbuild[\r][\n]"
> [ivy:resolve] 19:06:51,944 DEBUG [header] >> "[\r][\n]"
> [ivy:resolve] 19:06:54,118 DEBUG [header] << "HTTP/1.1 401 Unauthorized[\r][\n]"
> [ivy:resolve] 19:06:54,118 DEBUG [header] << "HTTP/1.1 401 Unauthorized[\r][\n]"
> [ivy:resolve] 19:06:54,118 DEBUG [header] << "Date: Sat, 04 Feb 2012 03:08:35 GMT[\r][\n]"
> [ivy:resolve] 19:06:54,118 DEBUG [header] << "Server: Artifactory/2.3.4.1[\r][\n]"
> [ivy:resolve] 19:06:54,119 DEBUG [header] << "WWW-Authenticate: Basic realm="Artifactory
Realm"[\r][\n]"
> [ivy:resolve] 19:06:54,119 DEBUG [header] << "Content-Type: text/html;charset=utf-8[\r][\n]"
> [ivy:resolve] 19:06:54,119 DEBUG [header] << "Transfer-Encoding: chunked[\r][\n]"
> [ivy:resolve] 19:06:54,119 DEBUG [header] << "Connection: close[\r][\n]"
> [ivy:resolve] 19:06:54,119 DEBUG [header] << "[\r][\n]"
> [ivy:resolve] 19:06:54,119 DEBUG [HttpMethodBase] Should close connection in response
to directive: close
> ... and this series of messages keeps repeating over and over again.
> If Basic auth fails, then Ivy should report it as an issue and continue with the next
site.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message