You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Tim Whittington <Ti...@orionhealth.com> on 2007/06/21 22:19:17 UTC
Re: svn commit: r549328 - in
/tomcat/connectors/trunk/jk/java/org/apache:
coyote/ajp/AjpAprProcessor.java jk/common/JkInputStream.java
This would limit dynamic (servlet) responses (and for practical purposes requests) to 32bit, but Tomcat could still serve static content with a 64bit content length.
tim
Tim Whittington
Development Unit Manager - Concerto Portal
Tim.Whittington@orionhealth.com
P: +64 9 638 0600 x3873
M: +64 21 307 925
F: +64 9 638 0699
S: tim.whittington
www.orionhealth.com
This e-mail and any attachments are intended only for the person to whom it is addressed and may contain privileged, proprietary, or other data protected from disclosure under applicable law. If you are not the addressee or the person responsible for delivering this to the addressee you are hereby notified that reading, copying or distributing this transmission is prohibited. If you have received this e-mail in error, please telephone us immediately and remove all copies of it from your system. Thank you for your co-operation.
>>> On 22/06/2007 at 12:24 a.m., in message <3F...@objektpark.de>, Peter Rossbach <pr...@objektpark.de> wrote:
Hi Rainer,
I have look at AccessLogValve to support 64 bit contentLength output,
but the complete servlet API based on int data type:
API 2.4/ 2.5
ServletRequest
public int getContentLength();
ServletResponse
public void setContentLength(int len);
public void setBufferSize(int size);
HttpServletRequest
public int getIntHeader(String name);
HTTPServletResponse
public void setIntHeader(String name, int value);
public void addIntHeader(String name, int value);
Bad news!
Peter
Am 21.06.2007 um 10:14 schrieb Rainer Jung:
> It works.
>
> Tested with slightly more than 4 GB. Tomcat now correctly returns
> the content length header, and mod_jk passes it to the client.
>
> Access logging behaves the same as before (broken for Apache 1.3
> and 2.0 and Tomcat as well).
>
> Thanks!
>
> billbarker@apache.org wrote:
>> Author: billbarker
>> Date: Wed Jun 20 19:21:36 2007
>> New Revision: 549328
>> URL: http://svn.apache.org/viewvc?view=rev&rev=549328
>> Log:
>> Allow for large-file support on downloads as well as uploads.
>> Reported By: Rainer Jung
>> Modified:
>> tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/
>> AjpAprProcessor.java
>> tomcat/connectors/trunk/jk/java/org/apache/jk/common/
>> JkInputStream.java
>> Modified: tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/
>> AjpAprProcessor.java
>> URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/java/
>> org/apache/coyote/ajp/AjpAprProcessor.java?
>> view=diff&rev=549328&r1=549327&r2=549328
>> =====================================================================
>> =========
>> --- tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/
>> AjpAprProcessor.java (original)
>> +++ tomcat/connectors/trunk/jk/java/org/apache/coyote/ajp/
>> AjpAprProcessor.java Wed Jun 20 19:21:36 2007
>> @@ -961,9 +961,9 @@
>> if (contentLanguage != null) {
>> headers.setValue("Content-Language").setString
>> (contentLanguage);
>> }
>> - int contentLength = response.getContentLength();
>> + long contentLength = response.getContentLengthLong();
>> if (contentLength >= 0) {
>> - headers.setValue("Content-Length").setInt
>> (contentLength);
>> + headers.setValue("Content-Length").setLong
>> (contentLength);
>> }
>> // Other headers
>> Modified: tomcat/connectors/trunk/jk/java/org/apache/jk/common/
>> JkInputStream.java
>> URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/java/
>> org/apache/jk/common/JkInputStream.java?
>> view=diff&rev=549328&r1=549327&r2=549328
>> =====================================================================
>> =========
>> --- tomcat/connectors/trunk/jk/java/org/apache/jk/common/
>> JkInputStream.java (original)
>> +++ tomcat/connectors/trunk/jk/java/org/apache/jk/common/
>> JkInputStream.java Wed Jun 20 19:21:36 2007
>> @@ -300,9 +300,9 @@
>> if( contentLanguage != null ) {
>> headers.setValue("Content-Language").setString
>> (contentLanguage);
>> }
>> - int contentLength = res.getContentLength();
>> + long contentLength = res.getContentLengthLong();
>> if( contentLength >= 0 ) {
>> - headers.setValue("Content-Length").setInt
>> (contentLength);
>> + headers.setValue("Content-Length").setLong
>> (contentLength);
>> }
>> int numHeaders = headers.size();
>> outputMsg.appendInt(numHeaders);
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r549328 - in/tomcat/connectors/trunk/jk/java/org/apache:coyote/ajp/AjpAprProcessor.java
jk/common/JkInputStream.java
Posted by Rainer Jung <ra...@kippdata.de>.
Not really: I tested >4GB downloads. Instead of setContentLength() you
can also setHeader for "Content-Length". Then you have the freedom to
format a larger number, because this API takes strings. It works for me.
Regards,
Rainer
Tim Whittington wrote:
> This would limit dynamic (servlet) responses (and for practical purposes
> requests) to 32bit, but Tomcat could still serve static content with a 64bit
> content length.
>
> tim
>
>
> --------------------------------------------------------------------------------
> * <http://www.orionhealth.com/>*
>
>
> *Tim Whittington
> Development Unit Manager - Concerto Portal*
> Tim.Whittington@orionhealth.com <ma...@orionhealth.com>
> P: +64 9 638 0600 x3873
> M: +64 21 307 925
> F: +64 9 638 0699
> S: tim.whittington <callto:tim.whittington>
> www.orionhealth.com <http://www.orionhealth.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org