commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Catrain Laurent (JIRA)" <>
Subject [jira] Created: (VFS-181) Test with https and url attributes
Date Mon, 03 Dec 2007 09:56:43 GMT
Test with https and url attributes

                 Key: VFS-181
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: Nightly Builds
         Environment: Windows XP , Jbuilder2007, java version "1.6.0_03"
            Reporter: Catrain Laurent
            Priority: Minor


i have to download several zip files from a https server with url attributes, so i make only
one connection with this server instead of create one connection per file. i use the  property
.setbaseFile of a StandardFileSystemManager object. Every thing works fine for ftp and http
server (local or remote) but when trying with https server with url attributes, it downloads
the first files and then for each other files after, it downloads always the first file...
see the code below...
According my tests, i hope this is a bug and not my unknowlegments...

/*String baseURI = ""; //or ftp work fine
		String fileURI  = "";
		String fileURI2 = "";*/
		String baseURI = "";
		String morebicURI = "zip:bicdownloader?action=getfile&productline=bicdirdbplus&product=morebic&content=full&format=txt";
		String bicdbpURI  = "zip:bicdownloader?action=getfile&productline=bicdirdbplus&product=bicdbp&content=full&format=txt";

		FileSystemOptions httpOpts = new FileSystemOptions();
		HttpFileSystemConfigBuilder.getInstance().setProxyPort(httpOpts, 8080);
				new StaticUserAuthenticator("", "logonForProxy",
				new StaticUserAuthenticator("",
						"logonForSwift", "PwdForSwift"));
		// ***************************************************

		//set only one permanent connection
		StandardFileSystemManager fs = new StandardFileSystemManager();
		//download first zip
		FileObject moreBic = fs.resolveFile(morebicURI);
		System.out.println("file 1 : " + moreBic.getName());
		// http,ftp and https : ok download the right file
		// return zip:!
		FileObject[] moreBicZip = moreBic.getChildren();
		for (int i = 0; i < moreBicZip.length; i++)
			System.out.println("Name file : " + moreBicZip[i].getName().getBaseName());

		//download second zip
		FileObject bicdbp = fs.resolveFile(bicdbpURI);
		System.out.println("file 2 : " + bicdbp.getName());
		// ftp,http : OK download the second file (bicdbp)
		// return zip:!
		// https : NOT OK download again the first file (moreBic) 
		// return zip:!
		FileObject[] bicdbpZip = bicdbp.getChildren();
		for (int i = 0; i < bicdbpZip.length; i++)
			System.out.println("Name file : " + bicdbpZip[i].getName().getBaseName());
		//content of bicdbpZip confirm the bug (OK with ftp, http AND NOT OK with https)

Laurent Catrain

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message