MAINT-1791 : Parcel media clear list crash. Reviewed by Kelly

master
simon@Simon-PC.lindenlab.com 2012-10-29 13:10:37 -07:00
parent 7f639cb715
commit 58a73b4fc1
2 changed files with 7 additions and 3 deletions

View File

@ -356,7 +356,8 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
}
}
while(1)
bool keep_looping = true;
while(keep_looping)
{
CURLcode result;
@ -408,8 +409,9 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
case CURLE_FAILED_INIT:
case CURLE_COULDNT_CONNECT:
status = STATUS_NO_CONNECTION;
keep_looping = false;
break;
default:
default: // CURLE_URL_MALFORMAT
llwarns << "URLRequest Error: " << result
<< ", "
<< LLCurl::strerror(result)
@ -417,6 +419,7 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
<< (mDetail->mURL.empty() ? "<EMPTY URL>" : mDetail->mURL)
<< llendl;
status = STATUS_ERROR;
keep_looping = false;
break;
}
}

View File

@ -219,7 +219,8 @@ void LLFloaterURLEntry::onBtnOK( void* userdata )
}
// Discover the MIME type only for "http" scheme.
if(scheme == "http" || scheme == "https")
if(!media_url.empty() &&
(scheme == "http" || scheme == "https"))
{
LLHTTPClient::getHeaderOnly( media_url,
new LLMediaTypeResponder(self->getHandle()));