| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 013436f commit cf31acb
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -434,7 +434,12 @@ void HTTPConnection::loop() { | |||
| 434 | 434 | if (resolvedResource.getMatchingNode()->_nodeType == HANDLER_CALLBACK) { | |
| 435 | 435 | // Did the client set connection:keep-alive? | |
| 436 | 436 | HTTPHeader * connectionHeader = _httpHeaders->get("Connection"); | |
| 437 | - if (connectionHeader != NULL && std::string("keep-alive").compare(connectionHeader->_value)==0) { | ||
| 437 | + std::string connectionHeaderValue = ""; | ||
| 438 | + if (connectionHeader != NULL) { | ||
| 439 | + connectionHeaderValue += connectionHeader->_value; | ||
| 440 | + std::transform(connectionHeaderValue.begin(), connectionHeaderValue.end(), connectionHeaderValue.begin(), ::tolower); | ||
| 441 | + } | ||
| 442 | + if (std::string("keep-alive").compare(connectionHeaderValue)==0) { | ||
| 438 | 443 | HTTPS_DLOGHEX("[ ] Keep-Alive activated. fid=", _socket); | |
| 439 | 444 | _isKeepAlive = true; | |
| 440 | 445 | } else { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments