diff options
author | Lynx Linden <lynx@lindenlab.com> | 2010-06-17 15:36:05 +0100 |
---|---|---|
committer | Lynx Linden <lynx@lindenlab.com> | 2010-06-17 15:36:05 +0100 |
commit | 7cc006347822a70f36175dc2627814a0eaeb9c0a (patch) | |
tree | 8c537fa8233ca4b80ab73ea8b7746ca75f323553 | |
parent | 68b956b0d3069267737e4f26f93f2bba9ee6cd9c (diff) |
EXT-7901 FIXED Allow clicking on http://secondlife.com/app URLs.
The SLE code makes any http://<host>/app, http://<host>/region,
or http://<host>/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"?
-rw-r--r-- | indra/newview/llslurl.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llslurl.h | 1 |
2 files changed, 13 insertions, 2 deletions
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) || diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h index 1210c398f1..e9b0e7f52a 100644 --- a/indra/newview/llslurl.h +++ b/indra/newview/llslurl.h @@ -47,6 +47,7 @@ public: static const char* SLURL_SECONDLIFE_PATH; static const char* SLURL_COM; static const char* WWW_SLURL_COM; + static const char* SECONDLIFE_COM; static const char* MAPS_SECONDLIFE_COM; static const char* SLURL_X_GRID_LOCATION_INFO_SCHEME; static LLSLURL START_LOCATION; |