-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Steffen,

On 8/21/2011 9:21 AM, Steffen Heil (Mailinglisten) wrote:
> Hi
> 
>> Actually, I'm not entirely correct and I am now remembering this
>> has been discussed before on either this list or the tomcat-dev
>> list.
> 
> Do you remember anything else about that thread? Something that
> might help me find it... ?

I've been looking for it, too, since I know it's been discussed.

There's this from users@
http://markmail.org/thread/vlebky5z6hl6wdjj

and this from dev@ (which is more recent)
http://markmail.org/thread/qpdza5qz4ziigkx5

>> Are you throwing an exception, or closing the inputstream?
> 
> I tried to throw an exception (IOException) but it seemed tomcat
> would then read the stream "for me".

Right, Tomcat will "drain" the InputStream for you. That provides a
"nicer" experience for a client that would otherwise receive a nasty
error (because the server hangs up before the complete request has
been made).

> I tried to close the inputstream I got from ServletUpload, I think
> I did not try to close request.getInputStream() yet. I will try.

Are you able to force the clients to use Expect/Continue?

Client:
PUT /foo/bar HTTP/1.1
Expect: 100-continue
Content-Length: 1234567890
Content-Type: image/jpeg

Server:
100 Continue (or some error code)

I'm not sure if you can determine merely from the headers whether or
not the request is going to be valid, so this might not be an option
for you. Or, you may have dumb (software) clients that can't be asked
to use Expect/Continue in this way.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5TsjMACgkQ9CaO5/Lv0PDZuQCgj4/ogEJEc3FyoaYY//57LNdn
hRcAoLp5hv8843erB8ZKgDwG+OLMFWX6
=LvX6
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to