Update to 3.5.2 and .net core 2.1

This commit is contained in:
stefan
2018-09-12 19:26:21 +02:00
parent c32d865638
commit 48facb797e
1419 changed files with 27525 additions and 88927 deletions

View File

@@ -7,6 +7,7 @@ using HttpStatusCode = SocketHttpListener.Net.HttpStatusCode;
using HttpVersion = SocketHttpListener.Net.HttpVersion;
using System.Linq;
using MediaBrowser.Model.Services;
using SocketHttpListener.Net;
namespace SocketHttpListener
{
@@ -51,10 +52,18 @@ namespace SocketHttpListener
{
get
{
return Headers.GetCookies(true);
return GetCookies(Headers, true);
}
}
private CookieCollection GetCookies(QueryParamCollection headers, bool response)
{
var name = response ? "Set-Cookie" : "Cookie";
return headers == null || !headers.Contains(name)
? new CookieCollection()
: CookieHelper.Parse(headers[name], response);
}
public bool IsProxyAuthenticationRequired
{
get
@@ -111,17 +120,6 @@ namespace SocketHttpListener
return res;
}
internal static HttpResponse CreateWebSocketResponse()
{
var res = new HttpResponse(HttpStatusCode.SwitchingProtocols);
var headers = res.Headers;
headers["Upgrade"] = "websocket";
headers["Connection"] = "Upgrade";
return res;
}
#endregion
#region Public Methods