summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llfloaterwebcontent.cpp6
-rw-r--r--indra/newview/llmediactrl.cpp22
-rw-r--r--indra/newview/llmediactrl.h4
-rw-r--r--indra/newview/llviewerparcelmedia.cpp6
5 files changed, 29 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..376e38ade3 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)
@@ -976,6 +960,12 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
};
break;
+ case MEDIA_EVENT_NAVIGATE_ERROR_PAGE:
+ {
+ LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_ERROR_PAGE" << LL_ENDL;
+ };
+ break;
+
case MEDIA_EVENT_CLICK_LINK_HREF:
{
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLICK_LINK_HREF, target is \"" << self->getClickTarget() << "\", uri is " << self->getClickURL() << LL_ENDL;
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();
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index 40f0b43313..dfa35edef4 100644
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -539,6 +539,12 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
};
break;
+ case MEDIA_EVENT_NAVIGATE_ERROR_PAGE:
+ {
+ LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_NAVIGATE_ERROR_PAGE" << LL_ENDL;
+ };
+ break;
+
case MEDIA_EVENT_CLICK_LINK_HREF:
{
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_CLICK_LINK_HREF, target is \"" << self->getClickTarget() << "\", uri is " << self->getClickURL() << LL_ENDL;