cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Howard" <coc...@leverageweb.com>
Subject RE: upload problem (WAS: RE: How to use the file uploading mechanism in cocoon)
Date Sat, 17 May 2003 12:29:48 GMT


> -----Original Message-----
> From: Leo Sutic [mailto:leo.sutic@inspireinfrastructure.com]
> > -----Original Message-----
> > From: Geoff Howard [mailto:cocoon@leverageweb.com]
> >
> > This makes the cleanup fail on CocoonServlet:1209.
>
> Does it? Since the instanceof test is done against the object returned
> from the requestFactory:
>
> 1045:       if (this.enableUploads) {
>                 request = requestFactory.getServletRequest(req);
>             } else {
>                 request = req;
>             }
>
> Which makes request a MultipartHttpServletRequest. So:
>
> 1209:           if (request instanceof MultipartHttpServletRequest) {
>                     ((MultipartHttpServletRequest) request).cleanup();
>                 }
>
> Should be invoked properly.

Yes, I think you're right - I noticed this last night when I went back to
look at CocoonServlet.  (The first call I mentioned still won't work
though).
What's weird is that I thought I have confirmed that the cleanup is not
happening.  I'll look at that more carefully.

> > What about exposing something like boolean isMultiPart()?
>
> What about exposing a dispose() method instead? In a request-response
> environment it makes sense to have an explicit disposal point.

We have to clarify where.  I assume you mean (as I did) to expose that on
the
environment's wrapper around the request.  I'd be perfectly happy with
that -
The environment has the real request, and so can do the instanceof test, and
can determine if MultipartHttpServletRequest.cleanup() can be called.  So,
+1 from me?

Geoff


Mime
View raw message