From kde-devel Tue Sep 18 19:22:21 2001 From: "Ben Schepens" Date: Tue, 18 Sep 2001 19:22:21 +0000 To: kde-devel Subject: FTP and MAILTO I/O slaves slightly broken? X-MARC-Message: https://marc.info/?l=kde-devel&m=100084528227818 I have found a problem with the redirect() call when redirecting to FTP and MAILTO URIs. I looked at the code in kdenetwork/lanbrowsing/kio_lan/kio_lan.cpp Using that code as a reference, I created the following get() method to redirect to a valid FTP site: ======================= void kio_helloProtocol::get(const KURL& url ) { QString sURL = url.prettyURL(); KURL urlToTry; KURL url_1("http://www.gatech.edu/"); KURL url_2("ftp://ftp.gatech.edu/"); KURL url_3("mailto:schepens@mindspring.com"); if (sURL.lower() == "hello:http") { urlToTry = url_1; } else if (sURL.lower() == "hello:ftp") { urlToTry = url_2; } else if (sURL.lower() == "hello:mailto") { urlToTry = url_3; } else { finished(); return; } QString path( QFile::encodeName(urlToTry.path())); if (path.isEmpty()) { urlToTry.setPath("/"); redirection(urlToTry); finished(); return; } else { redirection(urlToTry); finished(); return; } } ======================= I am using Konqeuror as the client: If I try to get("hello:http"), it works fine redirecting to http://www.gatech.edu If I try to get("hello:ftp"), I still get an error: "Cannot find /". However, the URI in the location bar after the redirect() call is correct and will work if you select it and hit the return key. If I try to get("hello:mailto"), I still get an error: KLauncher said: Error loading 'kmailservice %u'. However, the URI in the location bar after the redirect() call is correct and will work if you select it and hit the return key. It seems that the FTP and MAILTO I/O slaves are broken. Does anyone know about these or who I should contact to get this looked at? Thanks, Ben Schepens schepens@mindspring.com >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<