fix http version

This commit is contained in:
UbitUmarov
2020-04-22 00:00:24 +01:00
parent 6b6baa9e51
commit 212c25f906
3 changed files with 3 additions and 5 deletions

View File

@@ -39,7 +39,7 @@ namespace OSHttpServer
{
m_httpVersion = request.HttpVersion;
if (string.IsNullOrEmpty(m_httpVersion))
m_httpVersion = "HTTP/1.0";
m_httpVersion = "HTTP/1.1";
Status = HttpStatusCode.OK;
m_context = context;
@@ -222,7 +222,7 @@ namespace OSHttpServer
var sb = new StringBuilder();
if(string.IsNullOrWhiteSpace(m_httpVersion))
sb.AppendFormat("HTTP1/0 {0} {1}\r\n", (int)Status,
sb.AppendFormat("HTTP/1.1 {0} {1}\r\n", (int)Status,
string.IsNullOrEmpty(Reason) ? Status.ToString() : Reason);
else
sb.AppendFormat("{0} {1} {2}\r\n", m_httpVersion, (int)Status,