You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Joseph Walton (JIRA)" <ji...@apache.org> on 2014/09/14 14:16:33 UTC

[jira] [Commented] (HTTPCLIENT-1380) NTLMEngineImpl: Change exception message to be informative

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

Joseph Walton commented on HTTPCLIENT-1380:
-------------------------------------------

Although not fully informative, simply mentioning Unicode support may be an improvement here:

{noformat}
--- a/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
+++ b/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
@@ -1115,7 +1115,7 @@ final class NTLMEngineImpl implements NTLMEngine {
 
             if ((flags & FLAG_REQUEST_UNICODE_ENCODING) == 0) {
                 throw new NTLMEngineException(
-                        "NTLM type 2 message has flags that make no sense: "
+                        "NTLM type 2 message indicates no support for Unicode. Flags are: "
                                 + Integer.toString(flags));
             }
 
{noformat}


> NTLMEngineImpl: Change exception message to be informative
> ----------------------------------------------------------
>
>                 Key: HTTPCLIENT-1380
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1380
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpAuth
>    Affects Versions: 4.2.5
>            Reporter: Ricardo Pereira
>            Priority: Trivial
>             Fix For: Future
>
>
> The class NTLMEngineImpl throws an exception when the NTLM server sends the challenge message with the field NTLMSSP_NEGOTIATE_UNICODE set to 0, but the exception message says "NTLM type 2 message has flags that make no sense: ".
> The message gives no clue to what the problem is and forces the user to check the source code if (s)he wants to know why the exception was thrown.
> Consider changing the exception message to report what the problem really is.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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