hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1579495 - in /httpcomponents: httpclient/trunk/httpclient-win/src/main/java/org/apache/http/impl/auth/win/ httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/impl/client/ httpclient/trunk/httpclient/src/main/java/org/apac...
Date Thu, 20 Mar 2014 01:12:54 GMT
Author: sebb
Date: Thu Mar 20 01:12:53 2014
New Revision: 1579495

URL: http://svn.apache.org/r1579495
Log:
Standardise on Locale.ROOT for case-conversion

Modified:
    httpcomponents/httpclient/trunk/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AbstractAuthenticationHandler.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/HttpAuthenticator.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/StandardHttpRequestRetryHandler.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java
    httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/Header.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/Registry.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java

Modified: httpcomponents/httpclient/trunk/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient-win/src/main/java/org/apache/http/impl/auth/win/WindowsNegotiateScheme.java
Thu Mar 20 01:12:53 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.ROOT) : null;
         if (os != null && os.contains("windows")) {
             try {
                 return Sspi.MAX_TOKEN_SIZE > 0;

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AbstractAuthenticationHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AbstractAuthenticationHandler.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AbstractAuthenticationHandler.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AbstractAuthenticationHandler.java
Thu Mar 20 01:12:53 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.ROOT), header);
         }
         return map;
     }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java-deprecated/org/apache/http/impl/client/AuthenticationStrategyAdaptor.java
Thu Mar 20 01:12:53 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.ROOT));
         authScheme.processChallenge(challenge);
 
         final AuthScope authScope = new AuthScope(

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/conn/ssl/AbstractVerifier.java
Thu Mar 20 01:12:53 2014
@@ -186,12 +186,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.ROOT));
         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.ROOT);
             // Store CN in StringBuilder in case we need to report an error.
             buf.append(" <");
             buf.append(cn);

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/AuthSchemeBase.java
Thu Mar 20 01:12:53 2014
@@ -162,7 +162,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.ROOT);
         } else {
             return super.toString();
         }

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/DigestScheme.java
Thu Mar 20 01:12:53 2014
@@ -267,7 +267,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.ROOT));
             }
             if (request instanceof HttpEntityEnclosingRequest && qopset.contains("auth-int"))
{
                 qop = QOP_AUTH_INT;

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/HttpAuthenticator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/HttpAuthenticator.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/HttpAuthenticator.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/HttpAuthenticator.java
Thu Mar 20 01:12:53 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.ROOT));
                     if (challenge != null) {
                         this.log.debug("Authorization challenge processed");
                         authScheme.processChallenge(challenge);

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/auth/NTLMEngineImpl.java
Thu Mar 20 01:12:53 2014
@@ -590,7 +590,7 @@ final class NTLMEngineImpl implements NT
      */
     private static byte[] lmHash(final String password) throws NTLMEngineException {
         try {
-            final byte[] oemPassword = password.toUpperCase(Locale.US).getBytes(Consts.ASCII);
+            final byte[] oemPassword = password.toUpperCase(Locale.ROOT).getBytes(Consts.ASCII);
             final int length = Math.min(oemPassword.length, 14);
             final byte[] keyBytes = new byte[14];
             System.arraycopy(oemPassword, 0, keyBytes, 0, length);
@@ -643,9 +643,9 @@ final class NTLMEngineImpl implements NT
         }
         final HMACMD5 hmacMD5 = new HMACMD5(ntlmHash);
         // Upper case username, upper case domain!
-        hmacMD5.update(user.toUpperCase(Locale.US).getBytes(UNICODE_LITTLE_UNMARKED));
+        hmacMD5.update(user.toUpperCase(Locale.ROOT).getBytes(UNICODE_LITTLE_UNMARKED));
         if (domain != null) {
-            hmacMD5.update(domain.toUpperCase(Locale.US).getBytes(UNICODE_LITTLE_UNMARKED));
+            hmacMD5.update(domain.toUpperCase(Locale.ROOT).getBytes(UNICODE_LITTLE_UNMARKED));
         }
         return hmacMD5.getOutput();
     }
@@ -663,7 +663,7 @@ final class NTLMEngineImpl implements NT
         }
         final HMACMD5 hmacMD5 = new HMACMD5(ntlmHash);
         // Upper case username, mixed case target!!
-        hmacMD5.update(user.toUpperCase(Locale.US).getBytes(UNICODE_LITTLE_UNMARKED));
+        hmacMD5.update(user.toUpperCase(Locale.ROOT).getBytes(UNICODE_LITTLE_UNMARKED));
         if (domain != null) {
             hmacMD5.update(domain.getBytes(UNICODE_LITTLE_UNMARKED));
         }
@@ -986,7 +986,7 @@ final class NTLMEngineImpl implements NT
 
             hostBytes = unqualifiedHost != null? unqualifiedHost.getBytes(Consts.ASCII) :
null;
             domainBytes = unqualifiedDomain != null ? unqualifiedDomain
-                    .toUpperCase(Locale.US).getBytes(Consts.ASCII) : null;
+                    .toUpperCase(Locale.ROOT).getBytes(Consts.ASCII) : null;
         }
 
         /**
@@ -1239,7 +1239,7 @@ final class NTLMEngineImpl implements NT
             }
             hostBytes = unqualifiedHost != null ? unqualifiedHost.getBytes(UNICODE_LITTLE_UNMARKED)
: null;
             domainBytes = unqualifiedDomain != null ? unqualifiedDomain
-                    .toUpperCase(Locale.US).getBytes(UNICODE_LITTLE_UNMARKED) : null;
+                    .toUpperCase(Locale.ROOT).getBytes(UNICODE_LITTLE_UNMARKED) : null;
             userBytes = user.getBytes(UNICODE_LITTLE_UNMARKED);
         }
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/AuthenticationStrategyImpl.java
Thu Mar 20 01:12:53 2014
@@ -125,7 +125,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.ROOT), header);
         }
         return map;
     }
@@ -165,7 +165,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.ROOT));
             if (challenge != null) {
                 final AuthSchemeProvider authSchemeProvider = registry.lookup(id);
                 if (authSchemeProvider == null) {

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java
Thu Mar 20 01:12:53 2014
@@ -187,7 +187,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.ROOT));
             }
             final String path = b.getPath();
             if (TextUtils.isEmpty(path)) {

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/StandardHttpRequestRetryHandler.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/StandardHttpRequestRetryHandler.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/StandardHttpRequestRetryHandler.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/StandardHttpRequestRetryHandler.java
Thu Mar 20 01:12:53 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.ROOT);
         final Boolean b = this.idempotentMethods.get(method);
         return b != null && b.booleanValue();
     }

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java
Thu Mar 20 01:12:53 2014
@@ -92,7 +92,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.ROOT));
             }
             Assert.assertEquals(3, headerSet.size());
             Assert.assertTrue(headerSet.contains("connection"));

Modified: httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/Header.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/Header.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/Header.java
(original)
+++ httpcomponents/httpclient/trunk/httpmime/src/main/java/org/apache/http/entity/mime/Header.java
Thu Mar 20 01:12:53 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.ROOT);
         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.ROOT);
         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.ROOT);
         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.ROOT);
         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.ROOT);
         final List<MinimalField> list = fieldMap.get(key);
         if (list == null || list.isEmpty()) {
             addField(field);

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/Registry.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/Registry.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/Registry.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/Registry.java
Thu Mar 20 01:12:53 2014
@@ -53,7 +53,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.ROOT));
     }
 
     @Override

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/RegistryBuilder.java
Thu Mar 20 01:12:53 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.ROOT), item);
         return this;
     }
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java?rev=1579495&r1=1579494&r2=1579495&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java
Thu Mar 20 01:12:53 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.ROOT);
         Args.check(valid(type), "MIME type may not contain reserved characters");
         return new ContentType(type, charset);
     }



Mime
View raw message