Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 54633 invoked from network); 3 Dec 2007 09:57:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Dec 2007 09:57:22 -0000 Received: (qmail 77223 invoked by uid 500); 3 Dec 2007 09:57:04 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 77151 invoked by uid 500); 3 Dec 2007 09:57:03 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 77137 invoked by uid 99); 3 Dec 2007 09:57:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Dec 2007 01:57:03 -0800 X-ASF-Spam-Status: No, hits=-99.1 required=10.0 tests=ALL_TRUSTED,NORMAL_HTTP_TO_IP,URIBL_RHS_DOB X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Dec 2007 09:56:40 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B3928714209 for ; Mon, 3 Dec 2007 01:56:43 -0800 (PST) Message-ID: <9050509.1196675803732.JavaMail.jira@brutus> Date: Mon, 3 Dec 2007 01:56:43 -0800 (PST) From: "Catrain Laurent (JIRA)" To: issues@commons.apache.org Subject: [jira] Created: (VFS-181) Test with https and url attributes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Test with https and url attributes ---------------------------------- Key: VFS-181 URL: https://issues.apache.org/jira/browse/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 Hello, 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 = "http://127.0.0.1/"; //or ftp work fine String fileURI = "zip:test1.zip"; String fileURI2 = "zip:test2.zip";*/ String baseURI = "https://www2.swift.com/bicdownload/"; 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"; //https://www2.swift.com/bicdownload/bicdownloader?action=getfile&productline=bicdirdbplus&product=morebic&content=full&format=txt //https://www2.swift.com/bicdownload/bicdownloader?action=getfile&productline=bicdirdbplus&product=bicdbp&content=full&format=txt //**************************************************** FileSystemOptions httpOpts = new FileSystemOptions(); HttpFileSystemConfigBuilder.getInstance().setProxyHost(httpOpts,"10.255.170.65"); HttpFileSystemConfigBuilder.getInstance().setProxyPort(httpOpts, 8080); HttpFileSystemConfigBuilder.getInstance().setProxyAuthenticator( httpOpts, new StaticUserAuthenticator("", "logonForProxy", "pwdForProxy")); DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator( httpOpts, new StaticUserAuthenticator("www2.swift.com", "logonForSwift", "PwdForSwift")); // *************************************************** //set only one permanent connection StandardFileSystemManager fs = new StandardFileSystemManager(); fs.setBaseFile(VFS.getManager().resolveFile(baseURI,httpOpts)); fs.init(); //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:https://www2.swift.com/bicdownload/bicdownloader?action=getfile&productline=bicdirdbplus&product=morebic&content=full&format=txt! FileObject[] moreBicZip = moreBic.getChildren(); for (int i = 0; i < moreBicZip.length; i++) System.out.println("Name file : " + moreBicZip[i].getName().getBaseName()); moreBic.close(); //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://www2.swift.com/bicdownload/bicdownloader?action=getfile&productline=bicdirdbplus&product=bicdbp&content=full&format=txt! // https : NOT OK download again the first file (moreBic) // return zip:https://www2.swift.com/bicdownload/bicdownloader?action=getfile&productline=bicdirdbplus&product=morebic&content=full&format=txt! 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) bicdbp.close(); fs.close(); System.out.println("Done"); Rgds Laurent Catrain -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.