diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-12-28 16:13:12 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-28 16:13:12 -0500 |
| commit | 2cb0f3eed635bb468b3672d08dca9a720b4fb48f (patch) | |
| tree | 1a0d7c53ec148619ae966a81187413a33ca9a8a4 /SocketHttpListener.Portable/Net/HttpListenerResponse.cs | |
| parent | e47ccdce4247b93faa6d27849b255aac83324c42 (diff) | |
| parent | c10b152018967ddafe72efbccfe8ca6c586cbf04 (diff) | |
Merge pull request #2372 from MediaBrowser/beta
Beta
Diffstat (limited to 'SocketHttpListener.Portable/Net/HttpListenerResponse.cs')
| -rw-r--r-- | SocketHttpListener.Portable/Net/HttpListenerResponse.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/SocketHttpListener.Portable/Net/HttpListenerResponse.cs b/SocketHttpListener.Portable/Net/HttpListenerResponse.cs index c1182de34..9a5862cb9 100644 --- a/SocketHttpListener.Portable/Net/HttpListenerResponse.cs +++ b/SocketHttpListener.Portable/Net/HttpListenerResponse.cs @@ -386,7 +386,7 @@ namespace SocketHttpListener.Net if (content_type != null) { - if (content_encoding != null && content_type.IndexOf("charset=", StringComparison.Ordinal) == -1) + if (content_encoding != null && content_type.IndexOf("charset=", StringComparison.OrdinalIgnoreCase) == -1) { string enc_name = content_encoding.WebName; headers.SetInternal("Content-Type", content_type + "; charset=" + enc_name); @@ -429,9 +429,10 @@ namespace SocketHttpListener.Net * HttpStatusCode.InternalServerError 500 * HttpStatusCode.ServiceUnavailable 503 */ - bool conn_close = (status_code == 408 || status_code == 411 || + bool conn_close = status_code == 400 || status_code == 408 || status_code == 411 || status_code == 413 || status_code == 414 || - status_code == 503); + status_code == 500 || + status_code == 503; if (conn_close == false) conn_close = !context.Request.KeepAlive; |
