update comparisons

pull/1154/head
Luke Pulverenti 8 years ago
parent c2d80791be
commit 982d4cbb3e

@ -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;

Loading…
Cancel
Save