Hello Dirk,
I understand that Put works by itself when sending a text file.
When I tried sending a binary file, it did not work. That's why I decided to use
the WebdavResourse API.
Going back to my original question:
I like using the WebdavResource APIs.
I'd like to know if there is a way to disable the sending of PROPFIND method
when instantiating a WebdavResource object?
As I mentioned in my previous email, I've tried to instantiate it using:
WebdavResource(HttpURL, WebdavResource.NOACTION, DepthSupport.DEPTH_0);
But this caused a bad side-effect on the Put Method.
Thanks,
Carlos
Dirk Verbeeck wrote:
> You can always use the PutMethod directly:
>
> HttpClient client=new HttpClient();
> client.startSession("localhost",8080,new Credentials("dirk","dirk"));
> client.setDebug(1000);
> PutMethod pm=new PutMethod();
> pm.setPath("/slide/files/string.txt");
> pm.sendData("test sendData with string");
> client.executeMethod(pm);
> client.endSession();
>
> Dirk
>
> Carlos Hung wrote:
> >
> > I'm using the WebdavResource APIs in my application.
> >
> > Instantiating a WebdavResource(HttpURL url) generates a PROPFIND
> > method.
> >
> > I've tried to instantiate it using:
> > WebdavResource(HttpURL, WebdavResource.NOACTION,
> > DepthSupport.DEPTH_0);
> >
> > I do avoid the PROPFIND method; but I get this error message in the
> > web
> > server error.log:
> > "... request failed: error reading the headers"
> >
> > And my Put method fails.
> >
> > It seems that WebdavResource depends on a PROPFIND before a PUT
> > method.
> >
> > Could someone please tell me how I could invoke a PUT without doing a
> > PROPFIND method using the WebdavResource APIs?
> >
> > Thanks,
> > Carlos Hung
> >
> >