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

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1726956 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2016-01-27 08:30:35 +00:00
parent 6ba70b435c
commit 1d43ae8238
2 changed files with 5 additions and 2 deletions

View File

@ -7,6 +7,9 @@ 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 5.0-ALPHA1

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) {
// 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;
}
/**