[Modify] Replace it
This commit is contained in:
parent
d75c10708a
commit
203989148f
@ -660,16 +660,16 @@ namespace WebSocketSharp.Net
|
|||||||
internal WebHeaderCollection WriteHeadersTo (MemoryStream destination)
|
internal WebHeaderCollection WriteHeadersTo (MemoryStream destination)
|
||||||
{
|
{
|
||||||
var headers = new WebHeaderCollection (HttpHeaderType.Response, true);
|
var headers = new WebHeaderCollection (HttpHeaderType.Response, true);
|
||||||
|
|
||||||
if (_headers != null)
|
if (_headers != null)
|
||||||
headers.Add (_headers);
|
headers.Add (_headers);
|
||||||
|
|
||||||
if (_contentType != null) {
|
if (_contentType != null) {
|
||||||
var type = _contentType.IndexOf ("charset=", StringComparison.Ordinal) == -1 &&
|
headers.InternalSet (
|
||||||
_contentEncoding != null
|
"Content-Type",
|
||||||
? String.Format ("{0}; charset={1}", _contentType, _contentEncoding.WebName)
|
createContentTypeHeaderText (_contentType, _contentEncoding),
|
||||||
: _contentType;
|
true
|
||||||
|
);
|
||||||
headers.InternalSet ("Content-Type", type, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (headers["Server"] == null)
|
if (headers["Server"] == null)
|
||||||
|
Loading…
Reference in New Issue
Block a user