> -----Original Message----- > From: Christopher Lenz [mailto:[EMAIL PROTECTED]] > Sent: Saturday, January 26, 2002 08:07 > To: Slide Users List > Subject: Re: RE: Attn Developers - > org.apache.slide.webdav.WebdavServletConfi g > > > 24.01.2002 20:35:16, Frederic Kam-Thong <[EMAIL PROTECTED]> wrote: > > >I'd like to implement a servlet that does the following: > > - Handle http file uploads as per RFC 1867 > > - Execute a PUT without having to go through a HTTPClient > >for a web-based DAV client. > > I don't understand the second point, could you explain > more precisely ?
The Methods in lib.* have implement a sendData(...) method, the WebdavMethods to not. See below. > > >I was dissecting the WebdavServlet hoping gain some insight. > >It was then that I noticed that all the constructors in > >org.apache.slide.webdav.method.* > >need an instance of WebdavServletConfig as one of their parameter. My bad. getServletConfig() already returns an instance of WebdavServletConfig if you subclass from WebdavServlet... > > Well, I would recommend making a custom PostMethod > implementation to handle the file uploads. In your > WebdavServlet subclass, you override createWebdavMethod() > to handle the instantiation of you method class if the > method is "POST", and let super handle all the other > methods. > > For the implementation of the PostMethod you can look > at the code of PutMethod, as it will be pretty similar, > except for the additional complexities of handling the > multipart response body. > I thought about this. The problem is that one would need to parse the multipart request and construct a new chunked encoded request. Pretty inefficient if you ask me. I ended up basing my code on PutMethod's executeRequest() and doing it the long way... -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
