[
https://issues.apache.org/jira/browse/HTTPCLIENT-1901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16348203#comment-16348203
]
Oleg Kalnichevski commented on HTTPCLIENT-1901:
---
Works just fine for me.
{noformat}
Executing request GET http://httpbin.org/digest-auth/auth/user/passwd HTTP/1.1
to target http://httpbin.org:80
[DEBUG] RequestAddCookies - CookieSpec selected: default
[DEBUG] RequestAuthCache - Re-using cached 'digest' auth scheme for
http://httpbin.org:80
[DEBUG] PoolingHttpClientConnectionManager - Connection request: [route:
{}->http://httpbin.org:80][total kept alive: 0; route allocated: 0 of 2; total
allocated: 0 of 20]
[DEBUG] PoolingHttpClientConnectionManager - Connection leased: [id: 0][route:
{}->http://httpbin.org:80][total kept alive: 0; route allocated: 1 of 2; total
allocated: 1 of 20]
[DEBUG] MainClientExec - Opening connection {}->http://httpbin.org:80
[DEBUG] DefaultHttpClientConnectionOperator - Connecting to
httpbin.org/50.16.227.190:80
[DEBUG] DefaultHttpClientConnectionOperator - Connection established
192.168.43.64:50994<->50.16.227.190:80
[DEBUG] MainClientExec - Executing request GET /digest-auth/auth/user/passwd
HTTP/1.1
[DEBUG] MainClientExec - Target auth state: UNCHALLENGED
[DEBUG] MainClientExec - Proxy auth state: UNCHALLENGED
[DEBUG] headers - http-outgoing-0 >> GET /digest-auth/auth/user/passwd HTTP/1.1
[DEBUG] headers - http-outgoing-0 >> Content-Length: 0
[DEBUG] headers - http-outgoing-0 >> Host: httpbin.org
[DEBUG] headers - http-outgoing-0 >> Connection: Keep-Alive
[DEBUG] headers - http-outgoing-0 >> User-Agent:
Apache-HttpClient/4.6.0-alpha1-SNAPSHOT (Java/1.6.0_45)
[DEBUG] headers - http-outgoing-0 >> Accept-Encoding: gzip,deflate
[DEBUG] headers - http-outgoing-0 >> Authorization: Digest username="user",
realm="some realm", nonce="whatever", uri="/digest-auth/auth/user/passwd",
response="96c64282c4f38277194e231661123e75", algorithm=MD5
[DEBUG] headers - http-outgoing-0 << HTTP/1.1 200 OK
[DEBUG] headers - http-outgoing-0 << Connection: keep-alive
[DEBUG] headers - http-outgoing-0 << Server: meinheld/0.6.1
[DEBUG] headers - http-outgoing-0 << Date: Thu, 01 Feb 2018 08:36:01 GMT
[DEBUG] headers - http-outgoing-0 << Content-Type: application/json
[DEBUG] headers - http-outgoing-0 << Set-Cookie: fake=fake_value; Path=/
[DEBUG] headers - http-outgoing-0 << Access-Control-Allow-Origin: *
[DEBUG] headers - http-outgoing-0 << Access-Control-Allow-Credentials: true
[DEBUG] headers - http-outgoing-0 << X-Powered-By: Flask
[DEBUG] headers - http-outgoing-0 << X-Processed-Time: 0.00145816802979
[DEBUG] headers - http-outgoing-0 << Content-Length: 47
[DEBUG] headers - http-outgoing-0 << Via: 1.1 vegur
[DEBUG] MainClientExec - Connection can be kept alive indefinitely
{noformat}
Oleg
> Digest Auth Example Not Working with 4.5.4
> --
>
> Key: HTTPCLIENT-1901
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1901
> Project: HttpComponents HttpClient
> Issue Type: Bug
>Reporter: David Schreibman
>Priority: Major
>
> This example is not working as of 4.5.4
> [https://hc.apache.org/httpcomponents-client-ga/httpclient/examples/org/apache/http/examples/client/ClientPreemptiveDigestAuthentication.java]
> I suspect it's due to
> * [HTTPCLIENT-1855] Disabled caching of DIGEST auth scheme instances due to
> unreliability of nonce counter
> when the auth cache is shared by multiple sessions.
> Contributed by Oleg Kalnichevski
> Are you saying the example is no longer supported? If so, take it down.
> Can we have an example of non-preemptive digest auth?
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
-
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org