[Modify] Replace it
This commit is contained in:
parent
9ac578fa0e
commit
bbd545d657
@ -229,15 +229,11 @@ namespace WebSocketSharp.Net
|
|||||||
_response.StatusCode = _errorStatus;
|
_response.StatusCode = _errorStatus;
|
||||||
_response.ContentType = "text/html";
|
_response.ContentType = "text/html";
|
||||||
|
|
||||||
var content = new StringBuilder (64);
|
var content = createErrorContent (
|
||||||
content.AppendFormat (
|
_errorStatus,
|
||||||
"<html><body><h1>{0} {1}", _errorStatus, _response.StatusDescription
|
_response.StatusDescription,
|
||||||
);
|
_errorMessage
|
||||||
|
);
|
||||||
if (_errorMessage != null && _errorMessage.Length > 0)
|
|
||||||
content.AppendFormat (" ({0})</h1></body></html>", _errorMessage);
|
|
||||||
else
|
|
||||||
content.Append ("</h1></body></html>");
|
|
||||||
|
|
||||||
var enc = Encoding.UTF8;
|
var enc = Encoding.UTF8;
|
||||||
var entity = enc.GetBytes (content.ToString ());
|
var entity = enc.GetBytes (content.ToString ());
|
||||||
|
Loading…
Reference in New Issue
Block a user