[HTTPCLIENT-1715] NTLMEngineImpl.Type1Message not thread safe but declared as a constant.

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.5.x@1726957 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2016-01-27 08:34:23 +00:00
parent 3a9a452730
commit 517e64778f
2 changed files with 4 additions and 2 deletions

View File

@ -11,6 +11,8 @@ Changelog:
* [HTTPCLIENT-1714] Add HttpClientBuilder.setDnsResolver(DnsResolver).
Contributed by Alexis Thaveau <alexis.thaveau at gmail.com>
* [HTTPCLIENT-1715] NTLMEngineImpl.Type1Message not thread safe but declared as a constant.
Contributed by Olivier Lafontaine <olafontaine at gmail.com>, Gary Gregory <ggregory at apache.org>
Release 4.5.1

View File

@ -98,7 +98,7 @@ final class NTLMEngineImpl implements NTLMEngine {
SIGNATURE[bytesWithoutNull.length] = (byte) 0x00;
}
private static final Type1Message TYPE_1_MESSAGE = new Type1Message();
private static final String TYPE_1_MESSAGE = new Type1Message().getResponse();
/**
* Returns the response for the given message.
@ -145,7 +145,7 @@ final class NTLMEngineImpl implements NTLMEngine {
static String getType1Message(final String host, final String domain) throws NTLMEngineException {
// For compatibility reason do not include domain and host in type 1 message
//return new Type1Message(domain, host).getResponse();
return TYPE_1_MESSAGE.getResponse();
return TYPE_1_MESSAGE;
}
/**