diff --git a/websocket-sharp/Server/WebSocketBehavior.cs b/websocket-sharp/Server/WebSocketBehavior.cs index 5ae6c8f6..57690f36 100644 --- a/websocket-sharp/Server/WebSocketBehavior.cs +++ b/websocket-sharp/Server/WebSocketBehavior.cs @@ -4,7 +4,7 @@ * * The MIT License * - * Copyright (c) 2012-2015 sta.blockhead + * Copyright (c) 2012-2016 sta.blockhead * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -297,10 +297,10 @@ namespace WebSocketSharp.Server private string checkIfValidConnectionRequest (WebSocketContext context) { return _originValidator != null && !_originValidator (context.Origin) - ? "Invalid Origin header." - : _cookiesValidator != null && - !_cookiesValidator (context.CookieCollection, context.WebSocket.CookieCollection) - ? "Invalid Cookies." + ? "Includes no Origin header, or it has an invalid value." + : _cookiesValidator != null + && !_cookiesValidator (context.CookieCollection, context.WebSocket.CookieCollection) + ? "Includes no cookie, or an invalid cookie exists." : null; }