Mark Edgington wrote:
>
> After looking into this further many belive the problem lies
> with the call to res.getContentLength that is casuing a problem
> on the underlying server.
> So the simple soloution to the problem seems to be to modify the
> MultipartRequest class to allow it to work as follows.
>
> if (file is to large){
>         read through file
>         error file to large
> }
> else{
>         write whilst reading through file
>         yippie all was fine
> }
>
> This works fine, but i was wondering if anyone can think of any
> drawbacks in terms of server performance.

You say you're tested this approach and it works for you while the
standard approach doesn't?

If that's what you're saying, then perhaps the problem is that the
servlet is trying to send an error response to the client without
first reading the POST data.  That's a perfectly legit thing to do,
but perhaps JServ doesn't fully support it?

Someone with JServ who's affected by this problem should do the
following simple test:

1) Have a servlet receive a large file upload
2) Don't use MultipartRequest at all or read the POST data in any way
3) Send a response to the client printing the content-length value

If this errors out, then it's definitely a JServ issue.  Let us know
what you find.

-jh-

--
Jason Hunter
[EMAIL PROTECTED]
Book:    http://www.servlets.com/book
2.0 to 2.1: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.html
2.1 to 2.2: http://www.javaworld.com/jw-10-1999/jw-10-servletapi.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to