|
|
|
@ -41,6 +41,7 @@
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Contributors:
|
|
|
|
* Contributors:
|
|
|
|
* - Liryna <liryna.stark@gmail.com>
|
|
|
|
* - Liryna <liryna.stark@gmail.com>
|
|
|
|
|
|
|
|
* - Rohan Singh <rohan-singh@hotmail.com>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
@ -535,14 +536,11 @@ namespace WebSocketSharp.Net
|
|
|
|
else
|
|
|
|
else
|
|
|
|
content.Append ("</h1></body></html>");
|
|
|
|
content.Append ("</h1></body></html>");
|
|
|
|
|
|
|
|
|
|
|
|
var enc = res.ContentEncoding;
|
|
|
|
var enc = Encoding.UTF8;
|
|
|
|
if (enc == null) {
|
|
|
|
|
|
|
|
enc = Encoding.UTF8;
|
|
|
|
|
|
|
|
res.ContentEncoding = enc;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var entity = enc.GetBytes (content.ToString ());
|
|
|
|
var entity = enc.GetBytes (content.ToString ());
|
|
|
|
|
|
|
|
res.ContentEncoding = enc;
|
|
|
|
res.ContentLength64 = entity.LongLength;
|
|
|
|
res.ContentLength64 = entity.LongLength;
|
|
|
|
|
|
|
|
|
|
|
|
res.Close (entity, true);
|
|
|
|
res.Close (entity, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch {
|
|
|
|
catch {
|
|
|
|
|