tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elliot West <ell...@bomb.co.uk>
Subject Possible problem with binary uploads and tomcat 4.01/WARP
Date Mon, 05 Nov 2001 11:00:25 GMT
Hi there I have been struggling for a couple of days trying to get file 
uploads working working with the following setup:

Browser:                        IE5, Opera 5.12
Webserver:                      Apache 1.3.20
AppServer:                      Tomcat 4.01 (Using WARP)
MultpartMime classes:   Jason Hunter's MultipartRequest class 
(http://www.servlets.com/cos/index.html)

However, I have been coming across so rather strange results and believe 
there to be a bug in the Tomcat 4.01 implementation or WARP connector. I 
describe below the steps taken to arrive at this conclusion:

Aims
====
To determine which components of the configuration are preventing binary 
upload functionality from operating as intended.

Apparatus
=========
Files:          range of text (0x00 - 0x3F) and binary (0x00 - 0xFF) files
Form:           standard form with a single "FILE" element and encoding: 
"multipart/form-data"
Class:          Jason Hunter's MultipartRequest
Servlet:                Jason Hunter's DemoRequestUploadServlet

Method
======
1) Use my own form in conjunction with the servlet found at: 
http://www.servlets.com/jservlet2/examples/ch04/index.html#ex04_21. If this 
works correctly, then both browser and form can be considered to be 
operating correctly.
2) Use my own form in combination with an instance of 
'DemoRequestUploadServlet', running on Tomcat 4.01/WARP to determine 
whether or not the server setup is somehow to blame.

Observations
============
1) The form functions correctly with the handler on servlets.com.
2) Only files consisting of low order bytes (0x00 -> 0x3F) are uploaded 
correctly to the server. Files with higher order bytes, result in a 
'java.io.IOException: unexpected end of part' exception, thrown by 
MultipartRequest. Furthermore, a zero byte file of the correct name is 
created at the specified upload directory.

Conclusions
===========
1) The browser and form are not responsible for producing this error.
2) There is something going wrong in either Tomcat, the WARP connector or 
the MultipartRequest class. Given that MultipartRequest is used 
successfully on other implementations, I would wager that either Tomcat or 
the WARP connector are to blame.

Next steps
==========
I would be grateful if this issue could somehow be resolved. Would it be 
possible to produce a patch for Tomcat 4.01 to allow the correct operation 
of binary uploads?

Thank you for taking the time to read this.

Cheers - Elliot.





--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message