From d191143cbc3aef7cd68cad98e480fb656c9e8c01 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 13 Nov 2009 13:47:18 -0800 Subject: Special-case a "401" status ("auth required") in LLMimeDiscoveryResponder::error() to be treated as a mime type of "text/html" instead of a failure. --- indra/newview/llviewermedia.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 513fae41eb..b4164a94e8 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -159,12 +159,21 @@ public: virtual void error( U32 status, const std::string& reason ) { - llwarns << "responder failed with status " << status << ", reason " << reason << llendl; - if(mMediaImpl) + if(status == 401) + { + // This is the "you need to authenticate" status. + // Treat this like an html page. + completeAny(status, "text/html"); + } + else { - mMediaImpl->mMediaSourceFailed = true; + llwarns << "responder failed with status " << status << ", reason " << reason << llendl; + + if(mMediaImpl) + { + mMediaImpl->mMediaSourceFailed = true; + } } - // completeAny(status, "none/none"); } void completeAny(U32 status, const std::string& mime_type) -- cgit v1.2.3