From 7cc006347822a70f36175dc2627814a0eaeb9c0a Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Thu, 17 Jun 2010 15:36:05 +0100 Subject: EXT-7901 FIXED Allow clicking on http://secondlife.com/app URLs. The SLE code makes any http:///app, http:///region, or http:///secondlife URL be treated as a SLurl rather than a normal http URL. This seems to be overly general, and has bitten us because http://secondlife.com/app is used as a redirect URL for server release notes. In the short-term, I've made an exception for hostnames that match "secondlife.com", so that the server release notes work again. In the long-term, we should assess whether treating any URL that starts with a path of "app", "region", or "secondlife" should be treated as a SLurl. What happens when google adds "http://www.google.com/app"? --- indra/newview/llslurl.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'indra/newview/llslurl.cpp') diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index ff7e479368..0df7035f84 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -48,8 +48,9 @@ const char* LLSLURL::SLURL_COM = "slurl.com"; // text with www.slurl.com or a link explicitly pointing at www.slurl.com so testing for this // version is required also. -const char* LLSLURL::WWW_SLURL_COM = "www.slurl.com"; -const char* LLSLURL::MAPS_SECONDLIFE_COM = "maps.secondlife.com"; +const char* LLSLURL::WWW_SLURL_COM = "www.slurl.com"; +const char* LLSLURL::SECONDLIFE_COM = "secondlife.com"; +const char* LLSLURL::MAPS_SECONDLIFE_COM = "maps.secondlife.com"; const char* LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME = "x-grid-location-info"; const char* LLSLURL::SLURL_APP_PATH = "app"; const char* LLSLURL::SLURL_REGION_PATH = "region"; @@ -187,6 +188,15 @@ LLSLURL::LLSLURL(const std::string& slurl) (slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) || (slurl_uri.scheme() == LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME)) { + // *HACK: ignore http://secondlife.com/ URLs so that we can use + // http://secondlife.com/app/ redirect URLs + // This is only necessary while the server returns Release Note + // urls using this format rather that pointing to the wiki + if ((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME || + slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME) && + slurl_uri.hostName() == LLSLURL::SECONDLIFE_COM) + return; + // We're dealing with either a Standalone style slurl or slurl.com slurl if ((slurl_uri.hostName() == LLSLURL::SLURL_COM) || (slurl_uri.hostName() == LLSLURL::WWW_SLURL_COM) || -- cgit v1.2.3