(ixwebsocket) Fix #252 / regression in 11.0.2 with string comparisons
This commit is contained in:
		| @@ -105,6 +105,24 @@ namespace ix | ||||
|  | ||||
|         return ret; | ||||
| #else | ||||
|         // | ||||
|         // It was reported that on Android poll can fail and return -1 with | ||||
|         // errno == EINTR, which should be a temp error and should typically | ||||
|         // be handled by retrying in a loop. | ||||
|         // Maybe we need to put all syscall / C functions in | ||||
|         // a new IXSysCalls.cpp and wrap them all. | ||||
|         // | ||||
|         // The style from libuv is as such. | ||||
|         // | ||||
|         // int ret = -1; | ||||
|         // do | ||||
|         // { | ||||
|         //     ret = ::poll(fds, nfds, timeout); | ||||
|         // } | ||||
|         // while (ret == -1 && errno == EINTR); | ||||
|         // return ret; | ||||
|         // | ||||
|  | ||||
|         return ::poll(fds, nfds, timeout); | ||||
| #endif | ||||
|     } | ||||
|   | ||||
| @@ -8,10 +8,10 @@ | ||||
|  | ||||
| #include "IXHttp.h" | ||||
| #include "IXSocketConnect.h" | ||||
| #include "IXStrCaseCompare.h" | ||||
| #include "IXUrlParser.h" | ||||
| #include "IXUserAgent.h" | ||||
| #include "IXWebSocketHandshakeKeyGen.h" | ||||
| #include "IXStrCaseCompare.h" | ||||
| #include <algorithm> | ||||
| #include <iostream> | ||||
| #include <random> | ||||
| @@ -36,7 +36,7 @@ namespace ix | ||||
|  | ||||
|     bool WebSocketHandshake::insensitiveStringCompare(const std::string& a, const std::string& b) | ||||
|     { | ||||
|         return CaseInsensitiveLess::cmp(a, b); | ||||
|         return CaseInsensitiveLess::cmp(a, b) == 0; | ||||
|     } | ||||
|  | ||||
|     std::string WebSocketHandshake::genRandomString(const int len) | ||||
|   | ||||
| @@ -6,4 +6,4 @@ | ||||
|  | ||||
| #pragma once | ||||
|  | ||||
| #define IX_WEBSOCKET_VERSION "11.0.2" | ||||
| #define IX_WEBSOCKET_VERSION "11.0.3" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user