diff --git a/src/ulib/net/server/client_image.cpp b/src/ulib/net/server/client_image.cpp index 274704721..dd390e81f 100644 --- a/src/ulib/net/server/client_image.cpp +++ b/src/ulib/net/server/client_image.cpp @@ -1972,7 +1972,9 @@ int UClientImage_Base::handlerWrite() if (U_ClientImage_parallelization == U_PARALLELIZATION_CHILD) { -wait: if (UNotifier::waitForWrite(socket->iSockDesc, U_TIMEOUT_MS) == 1) goto write; +wait: if (socket->isOpen() == false) goto end; + + if (UNotifier::waitForWrite(socket->iSockDesc, U_TIMEOUT_MS) == 1) goto write; U_RETURN(U_NOTIFIER_DELETE); } @@ -1986,6 +1988,7 @@ wait: if (UNotifier::waitForWrite(socket->iSockDesc, U_TIMEOUT_MS) == 1) goto U_RETURN(U_NOTIFIER_OK); } +end: U_SRV_LOG("sendfile failed - sock_fd %d sfd %d count %u U_ClientImage_pclose(this) %d %B", socket->iSockDesc, sfd, count, U_ClientImage_pclose(this), U_ClientImage_pclose(this)); if ((U_ClientImage_pclose(this) & U_CLOSE) != 0) UFile::close(sfd); diff --git a/src/ulib/net/server/server.cpp b/src/ulib/net/server/server.cpp index 94332dfec..53df993e8 100644 --- a/src/ulib/net/server/server.cpp +++ b/src/ulib/net/server/server.cpp @@ -2038,10 +2038,10 @@ void UServer_Base::loadConfigParam() #ifdef U_EVASIVE_SUPPORT /** * This is the threshold for the number of requests for the same page (or URI) per page interval. - * Once the threshold for that interval has been exceeded (defaults to 3), the IP address of the client will be added to the blocking list + * Once the threshold for that interval has been exceeded (defaults to 2), the IP address of the client will be added to the blocking list */ - page_count = cfg->readLong(U_CONSTANT_TO_PARAM("DOS_PAGE_COUNT"), 3); + page_count = cfg->readLong(U_CONSTANT_TO_PARAM("DOS_PAGE_COUNT"), 2); /** * The interval for the page count threshold; defaults to 1 second intervals diff --git a/src/ulib/utility/uhttp.cpp b/src/ulib/utility/uhttp.cpp index 4955bd504..57fa452fe 100644 --- a/src/ulib/utility/uhttp.cpp +++ b/src/ulib/utility/uhttp.cpp @@ -3973,6 +3973,8 @@ int UHTTP::handlerREAD() if (UClientImage_Base::bsendGzipBomp) { + UClientImage_Base::bsendGzipBomp = false; + U_DEBUG("we strike back sending gzip bomb...", 0); U_SRV_LOG("we strike back sending gzip bomb...", 0); diff --git a/tests/ulib/test_ssl_server.cpp b/tests/ulib/test_ssl_server.cpp index e52653710..e8a902c39 100644 --- a/tests/ulib/test_ssl_server.cpp +++ b/tests/ulib/test_ssl_server.cpp @@ -49,7 +49,9 @@ class USSLClientImage : public UClientImage { { x509 = ((USSLSocket*)socket)->getPeerCertificate(); +# if OPENSSL_VERSION_NUMBER < 0x10100000L U_INTERNAL_ASSERT_DIFFERS(x509, 0) +# endif } if (x509) cerr << UCertificate(x509).print();