[ https://issues.apache.org/jira/browse/HTTPCLIENT-1545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14163422#comment-14163422 ]
Michael Osipov edited comment on HTTPCLIENT-1545 at 10/8/14 12:33 PM: ---------------------------------------------------------------------- I am having trouble to pass that test: {noformat} ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.apache.http.impl.auth.win.TestWindowsNegotiateScheme Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5.516 sec <<< FAILURE! - in org.apache.http.impl.auth.wi n.TestWindowsNegotiateScheme testNoInfiniteLoopOnSPNOutsideDomain(org.apache.http.impl.auth.win.TestWindowsNegotiateScheme) Time elapsed: 5.297 sec <<< ERROR! com.sun.jna.LastErrorException: GetLastError() returned 317 at com.sun.jna.platform.win32.Kernel32Util.formatMessage(Kernel32Util.java:68) at com.sun.jna.platform.win32.Kernel32Util.formatMessage(Kernel32Util.java:83) at com.sun.jna.platform.win32.Win32Exception.<init>(Win32Exception.java:42) at com.sun.jna.platform.win32.Win32Exception.<init>(Win32Exception.java:52) at org.apache.http.impl.auth.win.TestWindowsNegotiateScheme$WindowsNegotiateSchemeGetTokenFail.getToken(TestWind owsNegotiateScheme.java:132) at org.apache.http.impl.auth.win.WindowsNegotiateScheme.authenticate(WindowsNegotiateScheme.java:190) at org.apache.http.impl.auth.HttpAuthenticator.doAuth(HttpAuthenticator.java:239) at org.apache.http.impl.auth.HttpAuthenticator.generateAuthResponse(HttpAuthenticator.java:202) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:262) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:119) at org.apache.http.impl.auth.win.TestWindowsNegotiateScheme.testNoInfiniteLoopOnSPNOutsideDomain(TestWindowsNego tiateScheme.java:115) {noformat} Performed on my Windows XP box at home. No domain, just a local machine. Is that a JNA bug? See {{ERROR_MR_MID_NOT_FOUND: 317}} from http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382%28v=vs.85%29.aspx was (Author: michael-o): I am having trouble to pass that test: {noformat} ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.apache.http.impl.auth.win.TestWindowsNegotiateScheme Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5.516 sec <<< FAILURE! - in org.apache.http.impl.auth.wi n.TestWindowsNegotiateScheme testNoInfiniteLoopOnSPNOutsideDomain(org.apache.http.impl.auth.win.TestWindowsNegotiateScheme) Time elapsed: 5.297 sec <<< ERROR! com.sun.jna.LastErrorException: GetLastError() returned 317 at com.sun.jna.platform.win32.Kernel32Util.formatMessage(Kernel32Util.java:68) at com.sun.jna.platform.win32.Kernel32Util.formatMessage(Kernel32Util.java:83) at com.sun.jna.platform.win32.Win32Exception.<init>(Win32Exception.java:42) at com.sun.jna.platform.win32.Win32Exception.<init>(Win32Exception.java:52) at org.apache.http.impl.auth.win.TestWindowsNegotiateScheme$WindowsNegotiateSchemeGetTokenFail.getToken(TestWind owsNegotiateScheme.java:132) at org.apache.http.impl.auth.win.WindowsNegotiateScheme.authenticate(WindowsNegotiateScheme.java:190) at org.apache.http.impl.auth.HttpAuthenticator.doAuth(HttpAuthenticator.java:239) at org.apache.http.impl.auth.HttpAuthenticator.generateAuthResponse(HttpAuthenticator.java:202) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:262) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:119) at org.apache.http.impl.auth.win.TestWindowsNegotiateScheme.testNoInfiniteLoopOnSPNOutsideDomain(TestWindowsNego tiateScheme.java:115) {noformat} Performed on my Windows XP box at home. No domain, just a local machine. > Possible infinite loop when WindowsNegotiateScheme authentication fails > ----------------------------------------------------------------------- > > Key: HTTPCLIENT-1545 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1545 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Affects Versions: 4.4 Alpha1 > Environment: Windows > Reporter: Ka-Lok Fung > Fix For: 4.4 Beta1 > > Attachments: HTTPCLIENT-1545.patch.diff, HTTPCLIENT-1545.v2.patch.diff > > > When {{WindowsNegotiateScheme}} authentication fails, it's possible for > HttpClient to retry the authentication in an endless loop because the > {{continueNeeded}} flag is not set to {{false}} when authentication fails. > One possible way of causing authentication to fail is to use a service > principle name that is outside your Windows domain (e.g., HTTP/EXAMPLE.COM). -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org