You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2012/04/18 21:38:47 UTC

svn commit: r1327644 - in /httpcomponents/httpcore/trunk: httpcore-nio/src/main/java/org/apache/http/nio/entity/ httpcore/src/main/java/org/apache/http/entity/

Author: olegk
Date: Wed Apr 18 19:38:46 2012
New Revision: 1327644

URL: http://svn.apache.org/viewvc?rev=1327644&view=rev
Log:
mime -> MIME; default charset of 'application/json' changed to UTF-8 (thanks to Gary D. Gregory)

Modified:
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/entity/NStringEntity.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ContentType.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/entity/NStringEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/entity/NStringEntity.java?rev=1327644&r1=1327643&r2=1327644&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/entity/NStringEntity.java (original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/nio/entity/NStringEntity.java Wed Apr 18 19:38:46 2012
@@ -96,7 +96,7 @@ public class NStringEntity extends Abstr
     }
 
     /**
-     * Creates a NStringEntity with the specified content and charset. The mime type defaults
+     * Creates a NStringEntity with the specified content and charset. The MIME type defaults
      * to "text/plain".
      *
      * @param string content to be used. Not {@code null}.

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=1327644&r1=1327643&r2=1327644&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 Wed Apr 18 19:38:46 2012
@@ -43,7 +43,7 @@ import org.apache.http.message.BasicHead
 /**
  * Content type information consisting of a MIME type and an optional charset.
  * <p/>
- * This class makes no attempts to verify validity of mime-type and charset attributes.
+ * This class makes no attempts to verify validity of the MIME type.
  * The input parameters of the {@link #create(String, String)} method, however, may not
  * contain characters <">, <;>, <,> reserved by the HTTP specification.
  *
@@ -58,7 +58,7 @@ public final class ContentType {
     public static final ContentType APPLICATION_FORM_URLENCODED = create(
             "application/x-www-form-urlencoded", Consts.ISO_8859_1);
     public static final ContentType APPLICATION_JSON = create(
-            "application/json", Consts.ISO_8859_1);
+            "application/json", Consts.UTF_8);
     public static final ContentType APPLICATION_OCTET_STREAM = create(
             "application/octet-stream", (Charset) null);
     public static final ContentType APPLICATION_SVG_XML = create(
@@ -86,8 +86,8 @@ public final class ContentType {
     private final Charset charset;
 
     /**
-     * Given a mime type and a character set, constructs a ContentType.
-     * @param mimeType The mime type to use for the ContentType header.
+     * Given a MIME type and a character set, constructs a ContentType.
+     * @param mimeType The MIME type to use for the ContentType header.
      * @param charset The optional character set to use with the ContentType header.
      * @throws  UnsupportedCharsetException
      *          If no support for the named charset is available in this Java virtual machine

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java?rev=1327644&r1=1327643&r2=1327644&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java Wed Apr 18 19:38:46 2012
@@ -78,10 +78,10 @@ public class StringEntity extends Abstra
     }
 
     /**
-     * Creates a StringEntity with the specified content, mimetype and charset
+     * Creates a StringEntity with the specified content, MIME type and charset
      *
      * @param string content to be used. Not {@code null}.
-     * @param mimeType mime type to be used. May be {@code null}, in which case the default
+     * @param mimeType MIME type to be used. May be {@code null}, in which case the default
      *   is {@link HTTP#PLAIN_TEXT_TYPE} i.e. "text/plain"
      * @param charset character set to be used. May be {@code null}, in which case the default
      *   is {@link HTTP#DEF_CONTENT_CHARSET} i.e. "ISO-8859-1"
@@ -109,7 +109,7 @@ public class StringEntity extends Abstra
     }
 
     /**
-     * Creates a StringEntity with the specified content and charset. The mime type defaults
+     * Creates a StringEntity with the specified content and charset. The MIME type defaults
      * to "text/plain".
      *
      * @param string content to be used. Not {@code null}.