[Modify] Polish it

This commit is contained in:
sta 2016-02-04 15:05:23 +09:00
parent 465dbb091a
commit fccc4d8bec

View File

@ -4,7 +4,7 @@
* *
* The MIT License * 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 * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -297,10 +297,10 @@ namespace WebSocketSharp.Server
private string checkIfValidConnectionRequest (WebSocketContext context) private string checkIfValidConnectionRequest (WebSocketContext context)
{ {
return _originValidator != null && !_originValidator (context.Origin) return _originValidator != null && !_originValidator (context.Origin)
? "Invalid Origin header." ? "Includes no Origin header, or it has an invalid value."
: _cookiesValidator != null && : _cookiesValidator != null
!_cookiesValidator (context.CookieCollection, context.WebSocket.CookieCollection) && !_cookiesValidator (context.CookieCollection, context.WebSocket.CookieCollection)
? "Invalid Cookies." ? "Includes no cookie, or an invalid cookie exists."
: null; : null;
} }