ozeigermann 2004/11/09 07:00:28
Modified: src/webdav/server/org/apache/slide/webdav/method
GetMethod.java
Log:
Tomcat 5 seems to require to set the buffer size before the content length.
Fixed this.
Revision Changes Path
1.55 +7 -6
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/GetMethod.java
Index: GetMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/GetMethod.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- GetMethod.java 30 Oct 2004 08:45:21 -0000 1.54
+++ GetMethod.java 9 Nov 2004 15:00:28 -0000 1.55
@@ -267,6 +267,10 @@
("Last-Modified",
revisionDescriptor.getLastModified().toString());
+ // do this before setting content length, as Tomcat
5 seems to be picky
+ // about this
+ resp.setBufferSize(output);
+
if ( ((ranges == null) || (ranges.isEmpty())) ) {
// full content response
resp.setContentType
@@ -277,7 +281,6 @@
// Copy the input stream to our output stream
// (if requested)
if (printContent) {
- resp.setBufferSize(output);
copy(resourceInfo, is, os);
}
@@ -298,7 +301,6 @@
(revisionDescriptor.getContentType());
if (printContent) {
- resp.setBufferSize(output);
copy(resourceInfo, is, os, range);
}
@@ -309,7 +311,6 @@
+ mimeSeparation);
if (printContent) {
- resp.setBufferSize(output);
copy(resourceInfo, is, os,
ranges.elements(),
revisionDescriptor.getContentType());
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]