876 Commits

Author SHA1 Message Date
Günter Obiltschnig
541b2224a2 fix(Net): HTTP client request body RFC compliance #4935 2025-05-10 08:28:56 +02:00
Günter Obiltschnig
44c8c295ba fix(Net): HTTP server request body RFC compliance #4935 2025-05-10 08:28:49 +02:00
Günter Obiltschnig
961290eecd fix(NTLMCredentials): fix potentially uninitialized variable 2025-04-18 13:37:45 +02:00
Günter Obiltschnig
6f2f85913c fix(Net): A SEGV at Net/src/MultipartReader.cpp:164:1 #4915 (move assertion out of ctor) 2025-04-16 09:18:44 +02:00
Günter Obiltschnig
8845484260 fix(Net): A SEGV at Net/src/MultipartReader.cpp:164:1 #4915 2025-04-15 22:12:32 +02:00
Günter Obiltschnig
cb02210753 fix(Net): Another crash in Poco::Net::NTLMCredentials::parseChallengeMessage #4936 2025-04-15 21:31:58 +02:00
alex
3e7144957a Fix wrong/mistaken type comparisons。 (#4931) 2025-04-14 12:43:53 +02:00
Günter Obiltschnig
da7fcba551 fix(Net): Crash in Poco::Net::NTLMCredentials::parseChallengeMessage #4926 2025-04-09 21:31:01 +02:00
Jonas Bülow
1674052687 Fix warning deprecated-enum-enum-conversion on clang 2025-04-09 16:12:45 +02:00
Aleksandar Fabijanic
4b093d8f89 fix(VarHolder): MSVC warning #4886 (#4903)
* fix(VarHolder): MSVC warning #4886

* fix(VarHolder): do not convert unsigned #4886

* chore(SocketImpl): eliminate MSVC warning

* fix(VarHolder): do not convert unsigned (extract unpreserveSign()) #4886

* chore(testsuite): eliminate MSVC warnings

* chore(VarHolder): simplify unpreserveSign using constexpr.

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2025-03-20 12:35:48 +01:00
Aleksandar Fabijanic
1371c960e7 fix(TCPServer): continues to accept connections after stop() #4892 (#4896)
* fix(TCPServer): continues to accept connections after stop() #4892

* fix(TCPServer): first attempt to silence TSAN #4892

* fix(TCPServer): check stopped status after poll; add TCPServerFactory::stop() and allow factory to return nullptr on connection creation request #4892

* fix(TCPServer): initialize factory stopped flag #4892

* revert(SocketImpl): atomic sock fd
2025-03-13 08:14:19 +01:00
Matej Kenda
6f1b4f5670 Merge pull request #4893 from pocoproject/4875-prebuild-does-not-work-as-intended
Prebuild does not work as intended
2025-03-11 10:53:03 +01:00
Günter Obiltschnig
ebed75c9fd fix(Net): WebSocket receiveFrame() keeps returning the same frame when no payload (flags/header only) #4884 2025-02-27 20:52:22 +01:00
Günter Obiltschnig
b9af97ceb3 enh(Net): SocketImpl::sendFile() sends entire contents by repeatedly calling sendfile() if necessary 2025-02-10 08:32:47 +01:00
Günter Obiltschnig
356124a3f6 enh(Net): SocketImpl::sendFile() - remove signal handling (not thread safe and already done elsewhere); fix wrong signed/unsigned types; cleanup 2025-02-10 08:32:41 +01:00
Günter Obiltschnig
72345bd423 Merge pull request #4863 from pocoproject/fix-sendFile
Fix StreamSocket::sendFile()
2025-02-10 08:32:35 +01:00
Günter Obiltschnig
7e55b46dbf fix(Net): WebSocket: non-blocking receiveFrame()/receiveBytes() with TLS connection may get stuck receiving header #4850 2025-01-16 11:21:50 +01:00
Günter Obiltschnig
38a1e30965 Merge pull request #4845 from tyler92/fix-uninitialized-ntlm
fix(Net) Use of Uninitialized value in NTLMCredentials::parseChallengeMessage
2025-01-14 15:13:41 +01:00
Günter Obiltschnig
b9abe9823d Merge pull request #4838 from d3matt/odd_nonblocking_receive_incorrect_mask
fix(Net) bad mask with odd number of bytes
2025-01-14 15:13:34 +01:00
Lara Dzivdzanovic
82751df9e5 enh(SocketReactor): Add start() method #4833 (#4835) 2025-01-08 15:52:16 +01:00
Günter Obiltschnig
786f415f24 enh(Net): Poco::Net::HTTPResponse: add replaceCookie() and removeCookie() #4825 2024-12-19 10:51:35 +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
Günter Obiltschnig
401bec5010 style 2024-04-03 07:26:23 +02:00
zhuzeitou
3496e47475
Optimize Net module for Android (#4517)
* epoll is available on Android

* <ifaddrs.h> is introduced in android-24
2024-04-02 19:03:41 +02:00