diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llfloaterwebcontent.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llmediactrl.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llmediactrl.h | 4 |
4 files changed, 17 insertions, 20 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6a89f5681d..c626538808 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12586,5 +12586,16 @@ <key>Value</key> <integer>1</integer> </map> + <key>WebContentFloaterErrorURL</key> + <map> + <key>Comment</key> + <string>URL to navigate to if the Web content floater hits a page with a 400-499 HTTP status code</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>http://common-flash-secondlife-com.s3.amazonaws.com/viewer/v2.6/damballah/404.html</string> + </map> </map> </llsd> diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 058567492b..76fb985b39 100644 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -328,6 +328,12 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent const std::string link = self->getHoverLink(); mStatusBarText->setText( link ); } + else if(event == MEDIA_EVENT_NAVIGATE_ERROR_PAGE ) + { + std::string redirect_url = gSavedSettings.getString("WebContentFloaterErrorURL"); + mWebBrowser->navigateTo(redirect_url, "text/html"); + set_current_url(redirect_url); + } } void LLFloaterWebContent::set_current_url(const std::string& url) diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 9493fddf50..24038d0ee6 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -503,22 +503,6 @@ bool LLMediaCtrl::canNavigateForward() //////////////////////////////////////////////////////////////////////////////// // -void LLMediaCtrl::set404RedirectUrl( std::string redirect_url ) -{ - if(mMediaSource && mMediaSource->hasMedia()) - mMediaSource->getMediaPlugin()->set_status_redirect( 404, redirect_url ); -} - -//////////////////////////////////////////////////////////////////////////////// -// -void LLMediaCtrl::clr404RedirectUrl() -{ - if(mMediaSource && mMediaSource->hasMedia()) - mMediaSource->getMediaPlugin()->set_status_redirect(404, ""); -} - -//////////////////////////////////////////////////////////////////////////////// -// void LLMediaCtrl::clearCache() { if(mMediaSource) diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 38a74f90d3..7a28b0986d 100644 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -113,10 +113,6 @@ public: void setTarget(const std::string& target); - // set/clear URL to visit when a 404 page is reached - void set404RedirectUrl( std::string redirect_url ); - void clr404RedirectUrl(); - // Clear the browser cache when the instance gets loaded void clearCache(); |