You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by se...@apache.org on 2014/03/20 02:25:29 UTC
svn commit: r1579497 - in /httpcomponents:
httpclient/branches/4.3.x/httpclient-win/src/main/java/org/apache/http/impl/auth/win/
httpclient/branches/4.3.x/httpclient/src/main/java-deprecated/org/apache/http/impl/client/
httpclient/branches/4.3.x/httpcl...
Author: sebb
Date: Thu Mar 20 01:25:29 2014
New Revision: 1579497
URL: http://svn.apache.org/r1579497
Log:
Standardise on Locale.ENGLISH for case-conversion (cannot use ROOT as the code targets 1.5+)
Modified:
httpcomponents/httpclient/branches/4.3.x/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java
httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AbstractAuthenticationHandler.java
httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java
httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/client/protocol/ResponseContentEncoding.java
httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java
httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java
httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/HttpAuthenticator.java
httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java
httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java
httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/client/StandardHttpRequestRetryHandler.java
httpcomponents/httpclient/branches/4.3.x/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java
httpcomponents/httpclient/branches/4.3.x/httpmime/src/main/java/org/apache/http/entity/mime/Header.java
httpcomponents/httpcore/branches/4.3.x/httpcore/src/main/java/org/apache/http/config/Registry.java
httpcomponents/httpcore/branches/4.3.x/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java
httpcomponents/httpcore/branches/4.3.x/httpcore/src/main/java/org/apache/http/entity/ContentType.java
Modified: httpcomponents/httpclient/branches/4.3.x/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java Thu Mar 20 01:25:29 2014
@@ -67,7 +67,7 @@ public class WindowsNegotiateScheme exte
public static boolean isAvaliable() {
String os = System.getProperty("os.name");
- os = os != null ? os.toLowerCase(Locale.US) : null;
+ os = os != null ? os.toLowerCase(Locale.ENGLISH) : null;
if (os != null && os.contains("windows")) {
try {
return Sspi.MAX_TOKEN_SIZE > 0;
Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AbstractAuthenticationHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AbstractAuthenticationHandler.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AbstractAuthenticationHandler.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AbstractAuthenticationHandler.java Thu Mar 20 01:25:29 2014
@@ -106,7 +106,7 @@ public abstract class AbstractAuthentica
}
final int endIndex = pos;
final String s = buffer.substring(beginIndex, endIndex);
- map.put(s.toLowerCase(Locale.US), header);
+ map.put(s.toLowerCase(Locale.ENGLISH), header);
}
return map;
}
Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java Thu Mar 20 01:25:29 2014
@@ -111,7 +111,7 @@ class AuthenticationStrategyAdaptor impl
return options;
}
final String id = authScheme.getSchemeName();
- final Header challenge = challenges.get(id.toLowerCase(Locale.US));
+ final Header challenge = challenges.get(id.toLowerCase(Locale.ENGLISH));
authScheme.processChallenge(challenge);
final AuthScope authScope = new AuthScope(
Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/client/protocol/ResponseContentEncoding.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/client/protocol/ResponseContentEncoding.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/client/protocol/ResponseContentEncoding.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/client/protocol/ResponseContentEncoding.java Thu Mar 20 01:25:29 2014
@@ -81,7 +81,7 @@ public class ResponseContentEncoding imp
final HeaderElement[] codecs = ceheader.getElements();
boolean uncompressed = false;
for (final HeaderElement codec : codecs) {
- final String codecname = codec.getName().toLowerCase(Locale.US);
+ final String codecname = codec.getName().toLowerCase(Locale.ENGLISH);
if ("gzip".equals(codecname) || "x-gzip".equals(codecname)) {
response.setEntity(new GzipDecompressingEntity(response.getEntity()));
uncompressed = true;
Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java Thu Mar 20 01:25:29 2014
@@ -183,12 +183,12 @@ public abstract class AbstractVerifier i
// We're can be case-insensitive when comparing the host we used to
// establish the socket to the hostname in the certificate.
- final String hostName = normaliseIPv6Address(host.trim().toLowerCase(Locale.US));
+ final String hostName = normaliseIPv6Address(host.trim().toLowerCase(Locale.ENGLISH));
boolean match = false;
for(final Iterator<String> it = names.iterator(); it.hasNext();) {
// Don't trim the CN, though!
String cn = it.next();
- cn = cn.toLowerCase(Locale.US);
+ cn = cn.toLowerCase(Locale.ENGLISH);
// Store CN in StringBuilder in case we need to report an error.
buf.append(" <");
buf.append(cn);
Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java Thu Mar 20 01:25:29 2014
@@ -160,7 +160,7 @@ public abstract class AuthSchemeBase imp
public String toString() {
final String name = getSchemeName();
if (name != null) {
- return name.toUpperCase(Locale.US);
+ return name.toUpperCase(Locale.ENGLISH);
} else {
return super.toString();
}
Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java Thu Mar 20 01:25:29 2014
@@ -263,7 +263,7 @@ public class DigestScheme extends RFC261
final StringTokenizer tok = new StringTokenizer(qoplist, ",");
while (tok.hasMoreTokens()) {
final String variant = tok.nextToken().trim();
- qopset.add(variant.toLowerCase(Locale.US));
+ qopset.add(variant.toLowerCase(Locale.ENGLISH));
}
if (request instanceof HttpEntityEnclosingRequest && qopset.contains("auth-int")) {
qop = QOP_AUTH_INT;
Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/HttpAuthenticator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/HttpAuthenticator.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/HttpAuthenticator.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/HttpAuthenticator.java Thu Mar 20 01:25:29 2014
@@ -131,7 +131,7 @@ public class HttpAuthenticator {
case UNCHALLENGED:
if (authScheme != null) {
final String id = authScheme.getSchemeName();
- final Header challenge = challenges.get(id.toLowerCase(Locale.US));
+ final Header challenge = challenges.get(id.toLowerCase(Locale.ENGLISH));
if (challenge != null) {
this.log.debug("Authorization challenge processed");
authScheme.processChallenge(challenge);
Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java Thu Mar 20 01:25:29 2014
@@ -603,7 +603,7 @@ final class NTLMEngineImpl implements NT
*/
private static byte[] lmHash(final String password) throws NTLMEngineException {
try {
- final byte[] oemPassword = password.toUpperCase(Locale.US).getBytes("US-ASCII");
+ final byte[] oemPassword = password.toUpperCase(Locale.ENGLISH).getBytes("US-ASCII");
final int length = Math.min(oemPassword.length, 14);
final byte[] keyBytes = new byte[14];
System.arraycopy(oemPassword, 0, keyBytes, 0, length);
@@ -655,9 +655,9 @@ final class NTLMEngineImpl implements NT
try {
final HMACMD5 hmacMD5 = new HMACMD5(ntlmHash);
// Upper case username, upper case domain!
- hmacMD5.update(user.toUpperCase(Locale.US).getBytes("UnicodeLittleUnmarked"));
+ hmacMD5.update(user.toUpperCase(Locale.ENGLISH).getBytes("UnicodeLittleUnmarked"));
if (domain != null) {
- hmacMD5.update(domain.toUpperCase(Locale.US).getBytes("UnicodeLittleUnmarked"));
+ hmacMD5.update(domain.toUpperCase(Locale.ENGLISH).getBytes("UnicodeLittleUnmarked"));
}
return hmacMD5.getOutput();
} catch (final UnsupportedEncodingException e) {
@@ -676,7 +676,7 @@ final class NTLMEngineImpl implements NT
try {
final HMACMD5 hmacMD5 = new HMACMD5(ntlmHash);
// Upper case username, mixed case target!!
- hmacMD5.update(user.toUpperCase(Locale.US).getBytes("UnicodeLittleUnmarked"));
+ hmacMD5.update(user.toUpperCase(Locale.ENGLISH).getBytes("UnicodeLittleUnmarked"));
if (domain != null) {
hmacMD5.update(domain.getBytes("UnicodeLittleUnmarked"));
}
@@ -1004,7 +1004,7 @@ final class NTLMEngineImpl implements NT
hostBytes = unqualifiedHost != null? unqualifiedHost.getBytes("ASCII") : null;
domainBytes = unqualifiedDomain != null ? unqualifiedDomain
- .toUpperCase(Locale.US).getBytes("ASCII") : null;
+ .toUpperCase(Locale.ENGLISH).getBytes("ASCII") : null;
} catch (final UnsupportedEncodingException e) {
throw new NTLMEngineException("Unicode unsupported: " + e.getMessage(), e);
}
@@ -1260,7 +1260,7 @@ final class NTLMEngineImpl implements NT
hostBytes = unqualifiedHost != null ? unqualifiedHost
.getBytes("UnicodeLittleUnmarked") : null;
domainBytes = unqualifiedDomain != null ? unqualifiedDomain
- .toUpperCase(Locale.US).getBytes("UnicodeLittleUnmarked") : null;
+ .toUpperCase(Locale.ENGLISH).getBytes("UnicodeLittleUnmarked") : null;
userBytes = user.getBytes("UnicodeLittleUnmarked");
} catch (final UnsupportedEncodingException e) {
throw new NTLMEngineException("Unicode not supported: " + e.getMessage(), e);
Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java Thu Mar 20 01:25:29 2014
@@ -123,7 +123,7 @@ abstract class AuthenticationStrategyImp
}
final int endIndex = pos;
final String s = buffer.substring(beginIndex, endIndex);
- map.put(s.toLowerCase(Locale.US), header);
+ map.put(s.toLowerCase(Locale.ENGLISH), header);
}
return map;
}
@@ -162,7 +162,7 @@ abstract class AuthenticationStrategyImp
}
for (final String id: authPrefs) {
- final Header challenge = challenges.get(id.toLowerCase(Locale.US));
+ final Header challenge = challenges.get(id.toLowerCase(Locale.ENGLISH));
if (challenge != null) {
final AuthSchemeProvider authSchemeProvider = registry.lookup(id);
if (authSchemeProvider == null) {
Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java Thu Mar 20 01:25:29 2014
@@ -186,7 +186,7 @@ public class DefaultRedirectStrategy imp
final URIBuilder b = new URIBuilder(new URI(location).normalize());
final String host = b.getHost();
if (host != null) {
- b.setHost(host.toLowerCase(Locale.US));
+ b.setHost(host.toLowerCase(Locale.ENGLISH));
}
final String path = b.getPath();
if (TextUtils.isEmpty(path)) {
Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/client/StandardHttpRequestRetryHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/client/StandardHttpRequestRetryHandler.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/client/StandardHttpRequestRetryHandler.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/client/StandardHttpRequestRetryHandler.java Thu Mar 20 01:25:29 2014
@@ -72,7 +72,7 @@ public class StandardHttpRequestRetryHan
@Override
protected boolean handleAsIdempotent(final HttpRequest request) {
- final String method = request.getRequestLine().getMethod().toUpperCase(Locale.US);
+ final String method = request.getRequestLine().getMethod().toUpperCase(Locale.ENGLISH);
final Boolean b = this.idempotentMethods.get(method);
return b != null && b.booleanValue();
}
Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java Thu Mar 20 01:25:29 2014
@@ -91,7 +91,7 @@ public class TestMinimalClientRequestExe
final Header[] headers = reqWrapper.getAllHeaders();
final Set<String> headerSet = new HashSet<String>();
for (final Header header: headers) {
- headerSet.add(header.getName().toLowerCase(Locale.US));
+ headerSet.add(header.getName().toLowerCase(Locale.ENGLISH));
}
Assert.assertEquals(3, headerSet.size());
Assert.assertTrue(headerSet.contains("connection"));
Modified: httpcomponents/httpclient/branches/4.3.x/httpmime/src/main/java/org/apache/http/entity/mime/Header.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpmime/src/main/java/org/apache/http/entity/mime/Header.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpmime/src/main/java/org/apache/http/entity/mime/Header.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpmime/src/main/java/org/apache/http/entity/mime/Header.java Thu Mar 20 01:25:29 2014
@@ -54,7 +54,7 @@ public class Header implements Iterable<
if (field == null) {
return;
}
- final String key = field.getName().toLowerCase(Locale.US);
+ final String key = field.getName().toLowerCase(Locale.ENGLISH);
List<MinimalField> values = this.fieldMap.get(key);
if (values == null) {
values = new LinkedList<MinimalField>();
@@ -72,7 +72,7 @@ public class Header implements Iterable<
if (name == null) {
return null;
}
- final String key = name.toLowerCase(Locale.US);
+ final String key = name.toLowerCase(Locale.ENGLISH);
final List<MinimalField> list = this.fieldMap.get(key);
if (list != null && !list.isEmpty()) {
return list.get(0);
@@ -84,7 +84,7 @@ public class Header implements Iterable<
if (name == null) {
return null;
}
- final String key = name.toLowerCase(Locale.US);
+ final String key = name.toLowerCase(Locale.ENGLISH);
final List<MinimalField> list = this.fieldMap.get(key);
if (list == null || list.isEmpty()) {
return Collections.emptyList();
@@ -97,7 +97,7 @@ public class Header implements Iterable<
if (name == null) {
return 0;
}
- final String key = name.toLowerCase(Locale.US);
+ final String key = name.toLowerCase(Locale.ENGLISH);
final List<MinimalField> removed = fieldMap.remove(key);
if (removed == null || removed.isEmpty()) {
return 0;
@@ -110,7 +110,7 @@ public class Header implements Iterable<
if (field == null) {
return;
}
- final String key = field.getName().toLowerCase(Locale.US);
+ final String key = field.getName().toLowerCase(Locale.ENGLISH);
final List<MinimalField> list = fieldMap.get(key);
if (list == null || list.isEmpty()) {
addField(field);
Modified: httpcomponents/httpcore/branches/4.3.x/httpcore/src/main/java/org/apache/http/config/Registry.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.3.x/httpcore/src/main/java/org/apache/http/config/Registry.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.3.x/httpcore/src/main/java/org/apache/http/config/Registry.java (original)
+++ httpcomponents/httpcore/branches/4.3.x/httpcore/src/main/java/org/apache/http/config/Registry.java Thu Mar 20 01:25:29 2014
@@ -52,7 +52,7 @@ public final class Registry<I> implement
if (key == null) {
return null;
}
- return map.get(key.toLowerCase(Locale.US));
+ return map.get(key.toLowerCase(Locale.ENGLISH));
}
@Override
Modified: httpcomponents/httpcore/branches/4.3.x/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.3.x/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.3.x/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java (original)
+++ httpcomponents/httpcore/branches/4.3.x/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java Thu Mar 20 01:25:29 2014
@@ -56,7 +56,7 @@ public final class RegistryBuilder<I> {
public RegistryBuilder<I> register(final String id, final I item) {
Args.notEmpty(id, "ID");
Args.notNull(item, "Item");
- items.put(id.toLowerCase(Locale.US), item);
+ items.put(id.toLowerCase(Locale.ENGLISH), item);
return this;
}
Modified: httpcomponents/httpcore/branches/4.3.x/httpcore/src/main/java/org/apache/http/entity/ContentType.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.3.x/httpcore/src/main/java/org/apache/http/entity/ContentType.java?rev=1579497&r1=1579496&r2=1579497&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.3.x/httpcore/src/main/java/org/apache/http/entity/ContentType.java (original)
+++ httpcomponents/httpcore/branches/4.3.x/httpcore/src/main/java/org/apache/http/entity/ContentType.java Thu Mar 20 01:25:29 2014
@@ -172,7 +172,7 @@ public final class ContentType implement
* @return content type
*/
public static ContentType create(final String mimeType, final Charset charset) {
- final String type = Args.notBlank(mimeType, "MIME type").toLowerCase(Locale.US);
+ final String type = Args.notBlank(mimeType, "MIME type").toLowerCase(Locale.ENGLISH);
Args.check(valid(type), "MIME type may not contain reserved characters");
return new ContentType(type, charset);
}