diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 1b3a23ce4..b2808ad14 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -3827,6 +3827,9 @@ namespace NLGUI return; } + // received content from remote + std::string content = trim(_CurlWWW->Content); + // save HSTS header from all requests regardless of HTTP code if (_CurlWWW->hasHSTSHeader()) { @@ -3868,8 +3871,11 @@ namespace NLGUI else if ( (code < 200 || code >= 300) ) { // catches 304 not modified, but html is not in cache anyway - browseError(string("Connection failed\nhttp code " + toString((sint32)code) + ")\nURL '" + _CurlWWW->Url + "'").c_str()); - return; + // if server did not send any error back + if (content.empty()) + { + content = string("ERROR

Connection failed

HTTP code '" + toString((sint32)code) + "'

URL '" + _CurlWWW->Url + "'

"); + } } char *ch; @@ -3880,7 +3886,7 @@ namespace NLGUI contentType = ch; } - htmlDownloadFinished(_CurlWWW->Content, contentType, code); + htmlDownloadFinished(content, contentType, code); // clear curl handler if (MultiCurl)