hrev47602 adds 1 changeset to branch 'master' old head: b7e55f797d7b6ae695bdd2073328cee34b1e9ff6 new head: 35edaf281fddea9e0eca4b93e3aa9a75eb967dd2 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=35edaf2+%5Eb7e55f7 ---------------------------------------------------------------------------- 35edaf2: gopher: Fix for 0-length path This is the case for urls like gopher://gophernicus.org (without trailing /), which ended up being downloaded instead of displayed. [ François Revol <revol@xxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev47602 Commit: 35edaf281fddea9e0eca4b93e3aa9a75eb967dd2 URL: http://cgit.haiku-os.org/haiku/commit/?id=35edaf2 Author: François Revol <revol@xxxxxxx> Date: Wed Jul 30 09:20:56 2014 UTC ---------------------------------------------------------------------------- 1 file changed, 1 insertion(+), 1 deletion(-) src/kits/network/libnetapi/GopherRequest.cpp | 2 +- ---------------------------------------------------------------------------- diff --git a/src/kits/network/libnetapi/GopherRequest.cpp b/src/kits/network/libnetapi/GopherRequest.cpp index da1342a..951a9cc 100644 --- a/src/kits/network/libnetapi/GopherRequest.cpp +++ b/src/kits/network/libnetapi/GopherRequest.cpp @@ -193,7 +193,7 @@ BGopherRequest::BGopherRequest(const BUrl& url, BUrlProtocolListener* listener, // the first part of the path is actually the document type fPath = Url().Path(); - if (!Url().HasPath() || (fPath.Length() == 1 && fPath[0] == '/')) { + if (!Url().HasPath() || fPath.Length() == 0 || fPath == "/") { // default entry fItemType = GOPHER_TYPE_DIRECTORY; fPath = "";