|
|
|
@ -132,12 +132,11 @@ namespace WebSocketSharp
|
|
|
|
throw new WebSocketException (
|
|
|
|
throw new WebSocketException (
|
|
|
|
"The header part of a handshake is greater than the limit length.");
|
|
|
|
"The header part of a handshake is greater than the limit length.");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var crlf = "\r\n";
|
|
|
|
return Encoding.UTF8.GetString (buffer.ToArray ())
|
|
|
|
return Encoding.UTF8.GetString (buffer.ToArray ())
|
|
|
|
.Replace ("\r\n", "\n")
|
|
|
|
.Replace (crlf + " ", " ")
|
|
|
|
.Replace ("\n ", " ")
|
|
|
|
.Replace (crlf + "\t", " ")
|
|
|
|
.Replace ("\n\t", " ")
|
|
|
|
.Split (new string [] { crlf }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
|
.TrimEnd ('\n')
|
|
|
|
|
|
|
|
.Split ('\n');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|