diff --git a/Example/bin/Debug_Ubuntu/example.exe b/Example/bin/Debug_Ubuntu/example.exe index 35e5f224..5059a2b7 100755 Binary files a/Example/bin/Debug_Ubuntu/example.exe and b/Example/bin/Debug_Ubuntu/example.exe differ diff --git a/Example/bin/Debug_Ubuntu/example.exe.mdb b/Example/bin/Debug_Ubuntu/example.exe.mdb index 4edc2629..08de0fa4 100644 Binary files a/Example/bin/Debug_Ubuntu/example.exe.mdb and b/Example/bin/Debug_Ubuntu/example.exe.mdb differ diff --git a/Example/bin/Debug_Ubuntu/websocket-sharp.dll b/Example/bin/Debug_Ubuntu/websocket-sharp.dll index 342ac8b5..82518bfe 100755 Binary files a/Example/bin/Debug_Ubuntu/websocket-sharp.dll and b/Example/bin/Debug_Ubuntu/websocket-sharp.dll differ diff --git a/Example/bin/Debug_Ubuntu/websocket-sharp.dll.mdb b/Example/bin/Debug_Ubuntu/websocket-sharp.dll.mdb index fa0d2aeb..171032bb 100644 Binary files a/Example/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and b/Example/bin/Debug_Ubuntu/websocket-sharp.dll.mdb differ diff --git a/Example1/bin/Debug_Ubuntu/example1.exe b/Example1/bin/Debug_Ubuntu/example1.exe index 9d82bead..c049bf0a 100755 Binary files a/Example1/bin/Debug_Ubuntu/example1.exe and b/Example1/bin/Debug_Ubuntu/example1.exe differ diff --git a/Example1/bin/Debug_Ubuntu/example1.exe.mdb b/Example1/bin/Debug_Ubuntu/example1.exe.mdb index 0805fc90..08412dff 100644 Binary files a/Example1/bin/Debug_Ubuntu/example1.exe.mdb and b/Example1/bin/Debug_Ubuntu/example1.exe.mdb differ diff --git a/Example1/bin/Debug_Ubuntu/websocket-sharp.dll b/Example1/bin/Debug_Ubuntu/websocket-sharp.dll index 342ac8b5..82518bfe 100755 Binary files a/Example1/bin/Debug_Ubuntu/websocket-sharp.dll and b/Example1/bin/Debug_Ubuntu/websocket-sharp.dll differ diff --git a/Example1/bin/Debug_Ubuntu/websocket-sharp.dll.mdb b/Example1/bin/Debug_Ubuntu/websocket-sharp.dll.mdb index fa0d2aeb..171032bb 100644 Binary files a/Example1/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and b/Example1/bin/Debug_Ubuntu/websocket-sharp.dll.mdb differ diff --git a/Example2/bin/Debug_Ubuntu/example2.exe b/Example2/bin/Debug_Ubuntu/example2.exe index 8367bae8..d14bbdd8 100755 Binary files a/Example2/bin/Debug_Ubuntu/example2.exe and b/Example2/bin/Debug_Ubuntu/example2.exe differ diff --git a/Example2/bin/Debug_Ubuntu/example2.exe.mdb b/Example2/bin/Debug_Ubuntu/example2.exe.mdb index 8c0c53b2..e8bd360d 100644 Binary files a/Example2/bin/Debug_Ubuntu/example2.exe.mdb and b/Example2/bin/Debug_Ubuntu/example2.exe.mdb differ diff --git a/Example2/bin/Debug_Ubuntu/websocket-sharp.dll b/Example2/bin/Debug_Ubuntu/websocket-sharp.dll index 342ac8b5..82518bfe 100755 Binary files a/Example2/bin/Debug_Ubuntu/websocket-sharp.dll and b/Example2/bin/Debug_Ubuntu/websocket-sharp.dll differ diff --git a/Example2/bin/Debug_Ubuntu/websocket-sharp.dll.mdb b/Example2/bin/Debug_Ubuntu/websocket-sharp.dll.mdb index fa0d2aeb..171032bb 100644 Binary files a/Example2/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and b/Example2/bin/Debug_Ubuntu/websocket-sharp.dll.mdb differ diff --git a/Example3/bin/Debug_Ubuntu/Example3.exe b/Example3/bin/Debug_Ubuntu/Example3.exe index e90c9ae0..37b5ea29 100755 Binary files a/Example3/bin/Debug_Ubuntu/Example3.exe and b/Example3/bin/Debug_Ubuntu/Example3.exe differ diff --git a/Example3/bin/Debug_Ubuntu/Example3.exe.mdb b/Example3/bin/Debug_Ubuntu/Example3.exe.mdb index f62ec323..b15f52b5 100644 Binary files a/Example3/bin/Debug_Ubuntu/Example3.exe.mdb and b/Example3/bin/Debug_Ubuntu/Example3.exe.mdb differ diff --git a/Example3/bin/Debug_Ubuntu/websocket-sharp.dll b/Example3/bin/Debug_Ubuntu/websocket-sharp.dll index 342ac8b5..82518bfe 100755 Binary files a/Example3/bin/Debug_Ubuntu/websocket-sharp.dll and b/Example3/bin/Debug_Ubuntu/websocket-sharp.dll differ diff --git a/Example3/bin/Debug_Ubuntu/websocket-sharp.dll.mdb b/Example3/bin/Debug_Ubuntu/websocket-sharp.dll.mdb index fa0d2aeb..171032bb 100644 Binary files a/Example3/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and b/Example3/bin/Debug_Ubuntu/websocket-sharp.dll.mdb differ diff --git a/websocket-sharp.userprefs b/websocket-sharp.userprefs index a518f3ad..9b182064 100644 --- a/websocket-sharp.userprefs +++ b/websocket-sharp.userprefs @@ -1,10 +1,6 @@  - - - - - + diff --git a/websocket-sharp/RequestHandshake.cs b/websocket-sharp/RequestHandshake.cs index 27e18db2..351aa1d7 100644 --- a/websocket-sharp/RequestHandshake.cs +++ b/websocket-sharp/RequestHandshake.cs @@ -1,4 +1,4 @@ -#region MIT License +#region License /* * RequestHandshake.cs * @@ -37,13 +37,13 @@ namespace WebSocketSharp { internal class RequestHandshake : Handshake { - #region Private Field + #region Private Fields private NameValueCollection _queryString; #endregion - #region Private Constructor + #region Private Constructors private RequestHandshake() { @@ -51,20 +51,20 @@ namespace WebSocketSharp { #endregion - #region Public Constructor + #region Public Constructors public RequestHandshake(string uriString) { HttpMethod = "GET"; RequestUri = uriString.ToUri(); - + AddHeader("User-Agent", "websocket-sharp/1.0"); AddHeader("Upgrade", "websocket"); AddHeader("Connection", "Upgrade"); } #endregion - #region Properties + #region Public Properties public CookieCollection Cookies { get { @@ -132,17 +132,7 @@ namespace WebSocketSharp { #endregion - #region Public Static Methods - - public static RequestHandshake Parse(WebSocketContext context) - { - return new RequestHandshake { - Headers = context.Headers, - HttpMethod = "GET", - RequestUri = context.RequestUri, - ProtocolVersion = HttpVersion.Version11 - }; - } + #region Public Methods public static RequestHandshake Parse(string[] request) { @@ -165,9 +155,15 @@ namespace WebSocketSharp { }; } - #endregion - - #region Public Method + public static RequestHandshake Parse(WebSocketContext context) + { + return new RequestHandshake { + Headers = context.Headers, + HttpMethod = "GET", + RequestUri = context.RequestUri, + ProtocolVersion = HttpVersion.Version11 + }; + } public void SetCookies(CookieCollection cookies) { diff --git a/websocket-sharp/ResponseHandshake.cs b/websocket-sharp/ResponseHandshake.cs index e662694f..7e80687f 100644 --- a/websocket-sharp/ResponseHandshake.cs +++ b/websocket-sharp/ResponseHandshake.cs @@ -1,4 +1,4 @@ -#region MIT License +#region License /* * ResponseHandshake.cs * @@ -35,7 +35,7 @@ namespace WebSocketSharp { internal class ResponseHandshake : Handshake { - #region Constructor + #region Public Constructors public ResponseHandshake() : this(HttpStatusCode.SwitchingProtocols) @@ -47,12 +47,13 @@ namespace WebSocketSharp { public ResponseHandshake(HttpStatusCode code) { StatusCode = ((int)code).ToString(); - Reason = code.GetDescription(); + Reason = code.GetDescription(); + AddHeader("Server", "websocket-sharp/1.0"); } #endregion - #region Properties + #region Public Properties public CookieCollection Cookies { get { @@ -80,7 +81,7 @@ namespace WebSocketSharp { #endregion - #region Methods + #region Public Methods public static ResponseHandshake CreateCloseResponse(HttpStatusCode code) { diff --git a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll index 342ac8b5..82518bfe 100755 Binary files a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll and b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll differ diff --git a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll.mdb b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll.mdb index fa0d2aeb..171032bb 100644 Binary files a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll.mdb differ diff --git a/websocket-sharp/websocket-sharp.pidb b/websocket-sharp/websocket-sharp.pidb index 5a6ccf18..0c54a645 100644 Binary files a/websocket-sharp/websocket-sharp.pidb and b/websocket-sharp/websocket-sharp.pidb differ