Modified a few for the WebSocket.sendHandshakeRequest method

This commit is contained in:
sta 2014-12-20 15:13:05 +09:00
parent a23bd04bdc
commit 7f01d41679

View File

@ -1254,7 +1254,7 @@ namespace WebSocketSharp
_authChallenge = res.AuthenticationChallenge; _authChallenge = res.AuthenticationChallenge;
if (_credentials != null && if (_credentials != null &&
(!_preAuth || _authChallenge.Scheme == AuthenticationSchemes.Digest)) { (!_preAuth || _authChallenge.Scheme == AuthenticationSchemes.Digest)) {
if (res.Headers.Contains ("Connection", "close")) { if (res.HasConnectionClose) {
releaseClientResources (); releaseClientResources ();
setClientStream (); setClientStream ();
} }
@ -1270,7 +1270,7 @@ namespace WebSocketSharp
var url = res.Headers["Location"]; var url = res.Headers["Location"];
_logger.Warn (String.Format ("Received a redirection to '{0}'.", url)); _logger.Warn (String.Format ("Received a redirection to '{0}'.", url));
if (_enableRedirection) { if (_enableRedirection) {
if (url == null) { if (url.IsNullOrEmpty ()) {
_logger.Error ("No url to redirect is located."); _logger.Error ("No url to redirect is located.");
return res; return res;
} }