cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: [Fwd: [heads-up] Updated upload system and fixed a bunch of security issues]
Date Fri, 04 Apr 2003 15:59:16 GMT
Sylvain Wallez wrote:
> Stefano Mazzocchi wrote:
> 
> <snip/>
> 
>> Note that the Cocoon Environment Request object transparently wraps 
>> around the Object get(String name) method, so, you don't have to do 
>> any type casting since this is transparently done for you.
>>
>> The only difference is that since the Cocoon Environment doesn't 
>> specify the *input part* object (this is something we'll have to do in 
>> the future), the type casting is required to acquire the "input part" 
>> that wraps around the uploaded file.
> 
> 
> 
> What's the real contract behind "Object get(String)" ? The method name 
> isn't very meaninful and the JavaDoc is confusing, as it is identical to 
> the one for getAttribute(), although the implementation is obviously 
> different.
> 
> Furthermore, is get() useful for something other than file upload ? If 
> not, why don't we define "Object getMultipartPart(String)" and 
> remove/deprecate this method ?

MultipartHttpServletRequest is never accessed directly, so this contract 
isn't really meaningful.

The *real* contract is o.a.c.environment.Request which already contains

  object get(name);

and this should be changed to something more meaningful, but this 
requires much more thinking also to think about mail processing.

> We could even add this "InputPart" you're talking about to the 
> enviromnent, inspired by o.a.c.c.request.multipart.FilePart.

yes, but I didn't want to mess with the environment right before the 
release.


-- 
Stefano.



Mime
View raw message