878 Commits

Author SHA1 Message Date
Alex Fabijanic
1152c8f68d fix(TCPServer): initialize factory stopped flag #4892 2025-03-12 02:34:29 -05:00
Alex Fabijanic
1cd821984d fix(TCPServer): check stopped status after poll; add TCPServerFactory::stop() and allow factory to return nullptr on connection creation request #4892 2025-03-11 21:48:47 +01:00
Alex Fabijanic
01ec1c349c fix(TCPServer): first attempt to silence TSAN #4892 2025-03-11 16:59:41 +01:00
Alex Fabijanic
ed65f839d9 fix(TCPServer): continues to accept connections after stop() #4892 2025-03-11 15:36:19 +01:00
Lara Dzivdzanovic
4c70cfca68 Fix testSocketAddress for updated pocoproject.org IP 2025-03-11 09:41:37 +01:00
Günter Obiltschnig
7dd2024c9e fix(Net): WebSocket receiveFrame() keeps returning the same frame when no payload (flags/header only) #4884 2025-02-27 20:52:02 +01:00
Günter Obiltschnig
f32e3d0b90 enh(Net): SocketImpl::sendFile() sends entire contents by repeatedly calling sendfile() if necessary 2025-02-09 16:03:51 +01:00
Günter Obiltschnig
a70fe2b045 enh(Net): SocketImpl::sendFile() - remove signal handling (not thread safe and already done elsewhere); fix wrong signed/unsigned types; cleanup 2025-02-09 14:00:16 +01:00
Günter Obiltschnig
47a77751fb fix(tests): another attempt at fixing the flaky testSendFile*() 2025-02-08 18:04:36 +01:00
Günter Obiltschnig
db88e0ec00 fix(test): fix flaky test 2025-02-08 15:20:14 +01:00
Günter Obiltschnig
24ff931071 fix(Net): Issue concerning Net/CMakeLists.txt detection of HAVE_SENDFILE #4852 2025-02-08 13:48:14 +01:00
Günter Obiltschnig
a1abf9659d enh(Net): additional tests for StreamSocket::sendFile() 2025-02-08 13:02:43 +01:00
Günter Obiltschnig
66c1d30bb4 enh(Net): StreamSocket::sendFile() takes additional count parameter 2025-02-08 12:57:24 +01:00
Günter Obiltschnig
3d8040bb17 fix(tests): remove unused variables 2025-02-07 20:43:28 +01:00
Günter Obiltschnig
6fb0debd71 chore: add test for sendFile() 2025-02-07 18:42:17 +01:00
Günter Obiltschnig
13029fb524 fix(Net): fix SocketImpl::sendFile() #4831 2025-02-07 18:06:14 +01:00
Günter Obiltschnig
5cab3be5c4 enh(Net): add HTTPBufferPoolAllocator::pool() to get read-only access to the underlying MemoryPool 2025-02-03 09:33:52 +01:00
Günter Obiltschnig
705403d4f6 fix(Net): WebSocket: non-blocking receiveFrame()/receiveBytes() with TLS connection may get stuck receiving header #4850 2025-01-15 21:36:36 +01:00
Mikhail Khachayants
16e17b2c33 fix(Net) Use of Uninitialized value in NTLMCredentials::parseChallengeMessage 2025-01-10 22:55:03 +02:00
Günter Obiltschnig
5652837b8f
Merge pull request #4838 from d3matt/odd_nonblocking_receive_incorrect_mask
fix(Net) bad mask with odd number of bytes
2025-01-08 19:14:41 +01:00
Lara Dzivdzanovic
336e0e802f
enh(SocketReactor): Add start() method #4833 (#4835) 2025-01-08 15:48:58 +01:00
Matthew Stoltenberg
0cc3ab4d13 fix(Net) bad mask with odd number of bytes
Receiving an odd number of bytes in non-blocking mode results in using the wrong bytes to unmask the payload. Keep track of the number of payload bytes that have been unmasked.
2025-01-06 16:57:25 -07:00
Günter Obiltschnig
854d8c89d6 enh(Net): Poco::Net::HTTPResponse: add replaceCookie() and removeCookie() #4825 2024-12-19 10:46:06 +01:00
Günter Obiltschnig
1811f2f35c fix(NetSSL): shutdown behavior 2024-11-28 08:19:45 +01:00
Matej Kenda
76ea8c74c8 enh(C++17): Net: Modernisation of socket class declarations. 2024-11-19 21:45:40 +01:00
Matej Kenda
efb0745efc enh(SocketReactor): Introduce protected accessors to private members to be used in derived classes. 2024-11-19 21:45:40 +01:00
Milan Tepic
64d8777a0e feat(WindowsBuild): customizable path to include for pocoNetworkInitializer #4769 2024-11-19 16:40:51 +01:00
Günter Obiltschnig
2815ea45a9 enh(Net): add PollSet::size(); mark PollSet::count() as deprecated 2024-11-17 22:16:52 +01:00
Günter Obiltschnig
163509eb57 fix(WebSocket): re-add assignment operators 2024-11-16 18:56:03 +01:00
Günter Obiltschnig
63b4bfd8ba chore(WebSocket): docs 2024-11-16 18:42:38 +01:00
Günter Obiltschnig
cedd086362 feat(Net): Non-blocking WebSocket #4773 2024-11-16 16:49:50 +01:00
Günter Obiltschnig
5d69308bfd fix(Net): Non-blocking sockets support #4773 2024-11-16 16:48:48 +01:00
Alex Fabijanic
60a45e4bb3 chore: remove misplaced comment 2024-10-31 08:09:52 -05:00
Alex Fabijanic
c3abc7b1ec fix(IPAddress): windows scoped test, part II #4644 2024-10-30 22:41:11 -05:00
Alex Fabijanic
13ea31f442 fix(IPAddress): windows scoped test #4644 2024-10-30 22:16:27 -05:00
Alex Fabijanic
c77d021790 fix(IPAddress): TryParse scoped ipv6 addressess for addresses enclosed in [ ] #4644 2024-10-31 00:39:37 +01:00
Eric Eichhorn
82c17ea813 fix: aix build #4742 2024-10-23 13:51:06 +02:00
tyler92
aa0faed54f
test: move fuzzing tests from google/oss-fuzz repository (#4719) 2024-10-10 13:30:10 +02:00
Aleksandar Fabijanic
eaabd3ff8d
Stack trace (#4691)
* chore(Trace): add dev env settings

* add(Trace): init add Poco::trace and libbacktrace files

* feat(Exception): generate stack trace if enabled at compile time

* chore(DNSSD): remove binaries from git

* fix(Trace): build

* chore(ci): exclude exception text tests for trace build; add debug test script params

* chore(build): mac (dl)

* chore(cmake): Changes to build Trace with CMake.

* chore(cmake): Changes to build Trace on Windows

* chore(cmake): Improvements to include trace sample.

* chore(cmake): Fixes to properly build/link Trace on Linux

* chore(cmake): add_definitions --> add_compile_definitions

* chore(cmake): Build Trace as static and don't export it.

* chore(make): Link Trace with built-in libbacktrace on Linux

* chore(Trace): remove unnecessary sources for libbacktrace.

* chore(github): enable trace on a few github checks

* chore(cmake): Build Trace with clang++ on Linux.

* chore(cmake): Properly set POCO_ENABLE_TRACE globally when needed.

* fix(cmake): Trace: corrected include for clang on Linux

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2024-10-10 10:36:13 +02:00
Günter Obiltschnig
db1cc9507b fix(Net): HTTPCookie Constructor Fails to Handle Discard Attribute Properly (#4664) 2024-09-26 11:25:44 +02:00
Günter Obiltschnig
42ccb0d96d enh(Net): SMTPClientSession: replace bare newlines in message content with CRLF (#4689) 2024-09-26 11:16:36 +02:00
Mikhail Khachayants
cefab15f9f fix(MailMessage): double free if Content-Disposition is empty 2024-09-13 16:45:38 +02:00
Alexander B
710c2a41f3
Using native sendfile from OS for HttpServer (#4351)
* add possibility to use native sendFile from OS for HttpServerResponse
add option POCO_USE_SENDFILE_FOR_HTTPSERVER, default - OFF
add test for HttpServer - testFile
add define fro Config.h POCO_USE_SENDFILE_FOR_HTTPSERVER

* my fail, be carefull with macro and brackets

* replace option POCO_USE_SENDFILE_FOR_HTTPSERVER with compiletime
detected macro POCO_HAVE_SENDFILE
replace types for sendFile with platform depended
wrap possibility of using sendFile with macro, if sendFile doesn't exist
in OS, then all methods don't exist

* remove option POCO_USE_SENDFILE_FOR_HTTPSERVER from ci.yml

* wrap testSendFile in the suite with define POCO_HAVE_SENDFILE

* try fix compile problem with emscripten

* oh, emscripten again

* fix logical error in testSendFile

* fix problem with cmake-specific macro when usinf make-project

* revert types from platform depended to Poco::Int64 and Poco::UInt64
for sendfile
2024-09-01 20:45:33 +02:00
Étienne Dupuis
63bed8c8d3 Use Int64 for TcpServerDispatcher::totalConnections(), to prevent overflow 2024-08-26 16:06:47 +02:00
Matej Kenda
f24547cdcf enh(Poco): Mark deprecated functionality with C++ attributes and resolve internal usage of deprecated functions (#4551)
* enh(poco): Replace deprecated comments with C++ deprecated attribute.

* enh(Poco): Replace some deprecated functionality in Poco sources. (#4426)

* enh(Poco): Replace more deprecated functionality in Poco sources. (#4426)

* fix(CMake): Variable BUILD_SHARED_LIBS must be defined properly to create valid binaries.

* enh: Code improvements done while resolving deprecated functionality (#4426)

* Un-deprecate LocalDateTme (#4426)

* enh(Poco): Replace usage of deprecated functionality with other functions/classes (#4426)

* chore(SSL): temporarily un-deprecate SSL-related functionality (#4426)

* chore(SSL): temporarily un-deprecate old MongoDB protocol functionality (#4426)

* enh(Poco): Minor Hash improvements (#4426)

* enh(Foundation): Compile deprecated hash tests only when POCO_TEST_DEPRECATED is enabled (#4426)

* enh(Net): Compile deprecated Socket::select functionality only when POCO_TEST_DEPRECATED is enabled (#4426)

* enh(Bonjour): Replace deprecated Socket::select with PollSet (#4426)

* enh(Poco): Introduce POCO_DEPRECATED macro to have the ability to disable deprecation warnings in applications (#4426)

* test(ODBC): add few asserts to testStoredProcedureDynamicVar

* fix(ODBC): rename DynamicAny -> DynamicVar in tests

* fix(ODBC): make Dignostics static members inline to prevent explicit instantiation warnings on windows

---------

Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2024-07-29 08:37:35 +02:00
lanthora
2442c66f84 Add missing momory header file 2024-07-02 17:18:32 +02:00
Günter Obiltschnig
02b59b4d25 fix(Net): #4594: PollSet::poll on Windows always returns immediately after first connection, due to bad event socket implementation 2024-06-26 20:27:06 +02:00
Günter Obiltschnig
c6249d9b3f enh(Net): clear out stored credentials 2024-06-11 12:19:52 +02:00
Alexander B
1a0355f1b7
fix(Net::MessageHeader): Correct RFC 2047 decoding for two consecutive encoded words (#4542)
* fix bug #4535
RFC 2047 decodeWord

* modify logic
uses separate string which contains simbols between chunks and if this
string contains only space ot \n or \t or \v than trim it
2024-04-29 10:54:23 +02:00
Günter Obiltschnig
c8bb5b8cac chore(build): re-generated VS project files 2024-04-03 12:33:13 +02:00