Merge pull request #178 from vortigont/ssl_fastrst

reset wrong SSL connections instead of close
This commit is contained in:
Mathieu Carbou
2024-12-19 10:10:13 +01:00
committed by GitHub

View File

@ -71,10 +71,10 @@ void AsyncWebServerRequest::_onData(void* buf, size_t len) {
#ifndef ASYNC_TCP_SSL_ENABLED
if (_parseState == PARSE_REQ_START && len && ((uint8_t*)buf)[0] == 0x16) { // 0x16 indicates a Handshake message (SSL/TLS).
#ifdef ESP32
log_d("SSL/TLS handshake detected: closing connection");
log_d("SSL/TLS handshake detected: resetting connection");
#endif
_parseState = PARSE_REQ_FAIL;
_client->close();
_client->abort();
return;
}
#endif