abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From calav...@apache.org
Subject svn commit: r916287 - in /abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server: ProviderHelper.java context/SimpleResponseContext.java
Date Thu, 25 Feb 2010 13:42:11 GMT
Author: calavera
Date: Thu Feb 25 13:42:10 2010
New Revision: 916287

URL: http://svn.apache.org/viewvc?rev=916287&view=rev
Log:
fixes redundant assignation of mimeType. Thanks to Pascal Christoph

Modified:
    abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ProviderHelper.java
    abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/context/SimpleResponseContext.java

Modified: abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ProviderHelper.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ProviderHelper.java?rev=916287&r1=916286&r2=916287&view=diff
==============================================================================
--- abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ProviderHelper.java
(original)
+++ abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ProviderHelper.java
Thu Feb 25 13:42:10 2010
@@ -179,7 +179,7 @@
    * Return a 204 No Content response
    */
   public static ResponseContext nocontent(String reason) {
-    return new EmptyResponseContext(204,reason);
+    return new EmptyResponseContext(204, reason);
   }
 
   public static ResponseContext nocontent() {
@@ -337,7 +337,7 @@
       BaseResponseContext response = new BaseResponseContext(base);
       response.setStatus(status);
       if (lastModified != null) response.setLastModified(lastModified);
-      response.setContentType(MimeTypeHelper.getMimeType(base));
+//      response.setContentType(MimeTypeHelper.getMimeType(base));
       Document doc = base instanceof Document ? (Document)base : ((Element)base).getDocument();
       if (doc.getEntityTag() != null) {
         response.setEntityTag(doc.getEntityTag());

Modified: abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/context/SimpleResponseContext.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/context/SimpleResponseContext.java?rev=916287&r1=916286&r2=916287&view=diff
==============================================================================
--- abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/context/SimpleResponseContext.java
(original)
+++ abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/context/SimpleResponseContext.java
Thu Feb 25 13:42:10 2010
@@ -40,16 +40,13 @@
     this(null);
   }
   
-  protected SimpleResponseContext(
-    String encoding) {
-      this.encoding = 
-        encoding != null ? 
-          encoding : 
-          "UTF-8";
+  protected SimpleResponseContext(String encoding) {
+      if (encoding != null) {
+    	  this.encoding = encoding;
+      }
   }
   
-  protected SimpleResponseContext setEncoding(
-    String encoding) {
+  protected SimpleResponseContext setEncoding(String encoding) {
       this.encoding = encoding;
       return this;
   }



Mime
View raw message