DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36905>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36905


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW




------- Additional Comments From [EMAIL PROTECTED]  2005-10-05 09:48 -------
The error was produced with IE, DavExplorer and our own client code. Our own 
client code uses apache webdav libs. The client was run from a Windows XP SP2 
and MAC OSX 10.4.

Our Tomcat server (5.5.12) was running on port 80.

We tested the same clients on Apache 2.0.54 with mod_dav without any problems. 
This leads me to think that the problem lies with Tomcat and not our client.

Test code:
---------------------------------


import java.io.File;
import java.io.IOException;

import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.HttpURL;
import org.apache.commons.httpclient.URIException;
import org.apache.webdav.lib.WebdavResource;

public class ModDavTestClient {

        public static final String TEST_FILENAME = "myTestFile;testing.txt";
        public static final String TEST_FILEPATH = "C:/temp/";
        public static final String TEST_CONTEXT 
= "http://localhost:8080/planning/webdav/data/";;
        public static final String TEST_USERNAME = "upload";
        public static final String TEST_PASSWORD = "test123";
        
        public static void main(String args[]) {
                HttpURL homeUrl = null;
                WebdavResource webDavRes = null;
                boolean response = false;
                HttpURL dest = null;

                // Preparing File to be upload with webdav resource
                File inputFile = new File(TEST_FILEPATH + TEST_FILENAME);

                if (!inputFile.exists()) {
                        System.err.println("Test file not exists: " + 
TEST_FILEPATH
                                        + TEST_FILENAME);
                        System.exit(0);
                }

                // Creating HttpURL for WebdavResource
                try {
                        homeUrl = new HttpURL(TEST_CONTEXT);
                        homeUrl.setUserinfo(TEST_USERNAME, TEST_PASSWORD);
                } catch (URIException e) {
                        e.printStackTrace();
                }

                if (homeUrl == null) {
                        System.err.println("Error creating HomeURL");
                        System.exit(0);
                }

                // Creating WebdavResource
                try {
                        webDavRes = new WebdavResource(homeUrl);
                } catch (HttpException e) {
                        e.printStackTrace();
                        System.exit(0);
                } catch (IOException e) {
                        e.printStackTrace();
                        System.exit(0);
                }

                StringBuilder destUrl = new StringBuilder(TEST_CONTEXT);
                destUrl.append(TEST_FILENAME);

                try {
                        dest = new HttpURL(destUrl.toString());
                        dest.setUserinfo(TEST_USERNAME, TEST_PASSWORD);
                } catch (URIException e1) {
                        e1.printStackTrace();
                        try {
                                webDavRes.close();
                        } catch (IOException e) {
                        }
                        System.exit(0);
                }

                try {
                        System.out.println("Prepare writing to destination: " 
+ dest.getPath());
                } catch (URIException e2) {
                        e2.printStackTrace();
                        try {
                                webDavRes.close();
                        } catch (IOException e) {
                        }
                        System.exit(0);
                }

                try {
                        response = webDavRes.putMethod(dest.getPath(), 
inputFile);
                } catch (URIException e1) {
                        e1.printStackTrace();
                } catch (HttpException e1) {
                        e1.printStackTrace();
                } catch (IOException e1) {
                        e1.printStackTrace();
                }

                System.out.println("respond: " + response);

                try {
                        webDavRes.close();
                } catch (IOException e) {
                        e.printStackTrace();
                }
                System.exit(0);
        }

}


Running output:
--------------------
Prepare writing to destination: /planning/webdav/data/myTestFile;testing.txt
respond: true

Checking uploaded file:
-----------------------
[tomcat path]/webapps/planning/webdav/data/myTestFile

It suppose to be:
[tomcat path]/webapps/planning/webdav/data/myTestFile;testing.txt


Testing with same code, but upload to an Apache ModDav: it works.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to