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 2005/12/23 18:52:40 UTC
svn commit: r358843 - in
/jakarta/httpcomponents/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl:
CoyoteHttpEntity.java HttpConnectionProcessor.java
Author: olegk
Date: Fri Dec 23 09:52:31 2005
New Revision: 358843
URL: http://svn.apache.org/viewcvs?rev=358843&view=rev
Log:
Changed HttpEntity interface and related classes to allow lazy parsing of the content type and content encoding headers
Modified:
jakarta/httpcomponents/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/CoyoteHttpEntity.java
jakarta/httpcomponents/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java
Modified: jakarta/httpcomponents/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/CoyoteHttpEntity.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/CoyoteHttpEntity.java?rev=358843&r1=358842&r2=358843&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/CoyoteHttpEntity.java (original)
+++ jakarta/httpcomponents/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/CoyoteHttpEntity.java Fri Dec 23 09:52:31 2005
@@ -33,6 +33,7 @@
import java.io.InputStream;
import java.io.OutputStream;
+import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.coyote.NotImplementedException;
@@ -46,8 +47,6 @@
public class CoyoteHttpEntity implements HttpEntity {
private long contentLength = -1;
- private String contentType = null;
- private String contentEncoding = null;
private OutputStream outstream = null;
public CoyoteHttpEntity() {
@@ -74,20 +73,12 @@
return false;
}
- public String getContentType() {
- return this.contentType;
+ public Header getContentType() {
+ return null;
}
- public void setContentType(final String contentType) {
- this.contentType = contentType;
- }
-
- public String getContentEncoding() {
- return this.contentEncoding;
- }
-
- public void setContentEncoding(final String contentEncoding) {
- this.contentEncoding = contentEncoding;
+ public Header getContentEncoding() {
+ return null;
}
public boolean writeTo(final OutputStream outstream) throws IOException {
Modified: jakarta/httpcomponents/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java?rev=358843&r1=358842&r2=358843&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java (original)
+++ jakarta/httpcomponents/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/impl/HttpConnectionProcessor.java Fri Dec 23 09:52:31 2005
@@ -441,7 +441,6 @@
if (canResponseHaveBody(this.httpreq, this.httpres)) {
this.out = new CoyoteHttpEntity();
this.out.setContentLength(this.coyoteres.getContentLengthLong());
- this.out.setContentType(this.coyoteres.getContentType());
tmp.setEntity(this.out);
}
}