Sylvain Roche wrote:
>
> Hello,
>
> I want to use a multipart form to transfer some files for the client
> to my server (just as all free mail services use to do for the
> attachements). The request is handeled by a jar archive, which adds
> the abitlity to understand the multipart request. This archive was
> posted on this list maybe 2 months ago, but sorry, I don't remember by
> whom or in which thread. It's named cos.jar and comes from an O'Reilly
> book.

It's from my site.  See http://www.servlets.com.

> As I'm testing this system, I happen to have a weird behavior. When I
> transfer a file larger than 50 Kb, the file received is larger from
> +/- 150 bytes (the size of the extra bytes differs each time, and I
> can see any logical following). Smaller than 50 Kb, the file is valid.

Most of these problems tend to be server or plug-in problems, probably
because the input stream feature of servlets isn't heavily tested by
most vendors.  Can you try uploading the same files with the JSDK
server?  That's the reference implementation.

Questions:  What's in the extra bytes in the file you're uploading?
When it cuts bytes, does it always cut bytes off the end?

> As I looked into the source, I didn't see any special limit to the
> attachement for this size (there is one, but it limits the size at 1
> Mb).

Right, there's not much in the class that could cause 150 bytes to
disappear.  And the 1 Meg limit is user-settable, intended to protect
from denial of service attacks.

-jh-

--
Jason Hunter
[EMAIL PROTECTED]
Book:    http://www.servlets.com/book
Article: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.html

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to