struts Dude wrote:
Well, I'm lazy too :) I just came up with the idea. Whether it works is up to the people interested in it to test the idea.Cool! I was told 'detect file size without uploading' is impossible.
But you said 'might work' above, have you or anyone actually tried this??
OK, I am lazy to try this myself, but hey programmers are lazy.
From a glance at the servlet spec, this sort of thing might depend on the implementation. The servlet spec doesn't say the request object must be completely filled with the entire request when the servlet is given the object. So I assume it creates a request object, reads the header and populates it and provides an input stream for the object to use later. If you access parameters then it has to read in the stream, and then you must wait for the entire request to be sent. If you just check the headers then I assume the entire request isn't read and you can return a response before the entire request is sent by the browser.
But some containers might read the entire request (though I would doubt it as that would load it all into memory). I don't need this functionality, so I won't be testing it. If you do test it, can you post back to the mailing list with your experience so others can see he result.
-- Jason Lea
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]