Commit Graph

6164 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
551fe59771 ci(workflows): make apt installs non-interactive, add retries and diagnostic log upload for linux-gcc-cmake-odbc
Co-authored-by: aleks-f <2429093+aleks-f@users.noreply.github.com>
2025-12-05 23:29:03 +00:00
copilot-swe-agent[bot]
0bcdb2186a Initial plan 2025-12-05 23:25:52 +00:00
cliu
2bdeaff849 fix(data/odbc): change the preparing of uuid column type so that isNull() can properly get the actual size and check if it is null. 2025-11-27 10:28:41 +01:00
Matej Kenda
5144cea871 4781 mongodb remove obsolete protocol and modernise (#5067)
* feature(MongoDB): Remove obsolete legacy wire protocol.

* enh(MongoDB): Use more C++17 features, comments about thread safety.

* enh(MongoDB) Performance improvements (std::set --> std::vector, improved few internal functions).

* enh(MongoDB) Performance improvements (Document member index for fast search, optimised serialisation in OpMsgMessage).

* enh(MongoDB) Performance improvements (move semantics for Document::addElement, improved toString(), use noexcept where appropriate).

* enh(MongoDB): Introduce enums for binary subtypes and more user friendly printout of UUIDs.

* enh(MongoDB) Performance improvements (move semantics in Element, improved implementation of toString()).

* enh(MongoDB) Performance improvements (ObjectId and RegularExpression.).

* enh(MongoDB): add createIndex that uses new wire protocol.
2025-11-27 10:24:42 +01:00
Aleksandar Fabijanic
c775d5f3b7 feat(AsyncNotificationCenter): Auto-configure number of workers #5060 (#5061)
* feat(AsyncNotificationCenter): Auto-configure number of workers #5060
add/removeObserver utility functions
move AsyncNotificationCenter tests into a separate file
tests

* chore: update copyrighht
2025-11-13 08:36:07 +01:00
Alex Fabijanic
1284103b98 fix(AsyncNotificationCenter): hang on stop() #5059 2025-11-06 20:39:34 +01:00
Matej Kenda
7d08a85e5d chore(gitlab CI): clean npm cache to gain disk space. 2025-10-30 17:30:37 +01:00
Matej Kenda
8a4a2955d5 Use nullptr in C++ code (solves #4348) (#5043)
* chore(CppParser): 0, NULL --> nullptr

* chore(Crypto): 0, NULL --> nullptr

* chore(DNSSD): 0, NULL --> nullptr

* chore(Encodings): 0, NULL --> nullptr

* chore(CppUnit): Correct indentation.

* chore(Foundation): 0, NULL --> nullptr

* chore(CMake): Always warn about wrong nullptr usage when compiling with GCC or CLang

* chore(Net): 0, NULL --> nullptr

* chore(Foundation): 0, NULL --> nullptr

* chore(Data): 0, NULL --> nullptr

* chore(macOS): 0, NULL --> nullptr

* chore(XML): 0, NULL --> nullptr

* chore(Zip): 0, NULL --> nullptr

* chore(Util): 0, NULL --> nullptr

* chore(Net/NetSSL): 0, NULL --> nullptr

* chore(Bonjour): 0, NULL --> nullptr

* chore(MongoDB, Redis): 0, NULL --> nullptr

* chore(Poco): 0, NULL --> nullptr

* chore(Win32): 0, NULL --> nullptr

* chore(CMake): Only warn about nullptr when verbose warnings are enabled.

* Potential fix for code scanning alert no. 1634: Guarded Free

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* chore(Net): Fix warning reported by gitlab.

* chore(gitlab CI): attempt to clean to gain disk space on the runner.

* chore(gitlab CI): Run build with  --parallel 4, correct docker cleanup.

---------

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-30 15:20:53 +01:00
Lara Dzivdzanovic
3e10fb2b0f Adapt makefiles for external dependencies (#5049)
* build(makefile): adapt makefiles for external dependencies

* chore(makefile): remove redundant src directory
2025-10-22 14:55:41 +02:00
Matej Kenda
61215896b6 * chore(v8_double_conversion): Add missing header files from Foundation to dependencies. 2025-10-16 23:05:44 +02:00
Matej Kenda
d8faf067cc * chore(v8_double_conversion): Move remaining files from Foundation to dependencies. 2025-10-16 22:47:46 +02:00
Matej Kenda
2ec40a0528 CMake: Add missing link libraries in dependencies (fix #5044). (#5046)
* fix(dependencies, CMake): Add missing link libraries in dependencies.

* chore(CI): Enable PDF in linux-gcc-cmake-visibility-hidden.

* enh(CMake): do not link zlib to PDF when building a shared library
2025-10-15 16:48:17 +02:00
siren186
852cf714ba Poco::Path("C:") throws if the path is disk-letter only #4573 (#5020)
* fix(Path): Poco::Path::forDirectory("C:") throws if the path is disk-letter only #4573

* keep code style
2025-10-15 14:32:45 +02:00
siren186
4b05e8ea28 fix(File): Poco::File crashed when handle windows very long path(\\?\C:) #5011 (#5021)
* fix(Path): Poco::File crashed when handle windows very long path(\\?\C:)

* fix(Path): revert some code
2025-10-15 14:31:04 +02:00
Aleksandar Fabijanic
05d6e1341a Add DataNotification #5047 2025-10-14 22:04:01 +02:00
Alex Fabijanic
9a41cb2bce enh(build): Linux debug build flags #5033 2025-10-13 13:21:57 +02:00
Matej Kenda
4540bbf66e fix(Foundation): Correct target_link_libraries to link properly with static build also 2025-10-09 10:31:47 +02:00
Matej Kenda
6bd0221d63 Reorganise external libs to separate subdirectory (#4996)
* chore(v8_double_conversion): Move files from Foundation to dependencies.
2025-10-09 08:45:44 +02:00
Günter Obiltschnig
44cb76262d Merge pull request #5038 from slabko/keep-peer-host-name
Prevent hostname being replaced with IP during handshake
2025-10-02 09:49:32 +02:00
Andrew Slabko
8c85619d64 Prevent hostname being replaced with IP during handshake
Before the handshake is performed, SecureSocketImpl::stateClientConnected
overrides the peer hostname with its IP address, making it impossible to send
SNI during the handshake in SecureSocketImpl::stateClientHandshakeStart.

This behavior essentially breaks SNI and prevents the library from being used
with load balancers that rely on SNI to determine the destination host.

Everywhere else, the peer hostname is replaced by the IP address only when the
peer hostname is empty. That makes total sense; however, it seems like this
check was forgotten in SecureSocketImpl::stateClientConnected.
2025-10-01 22:31:04 +02:00
sky92zwq
68616db653 Add an implementation of reactor http server (#4946)
* reactor http server

* fix

* test logic

* add reactor server session , use buf to cache socket buffer

* add reactor example

* fix: nodelay, otherwise ack will be after 50 ms

* tcp reactor server support multi listener

* fix: tcp reactor connection lifetime about socket

* feat: add tcp reactor params

* format

* check http reqeust complete, dynamic size buffer in reactor

* remove try catch

* remove debug logger

* remove debug logger

* fix: should not pop in destructor

* delete useless

* remove cankeepalive temporarily, optimize check complete req

* coding style

* coding style

* reactor server session unit test

* http reactor time server add delay param

* optimize switch case, and pop completed msg in destructor

* refactor reactor server session

* fix: check completed request when headers are in lower case like oha, add unit tests

* fix auto_ptr compile error, remove logger and coding style

* compile and tests fix, add reactor obj in makefile and vcxproj

* compile and tests fix in win, add reactor sample vcxproj

* compile and tests fix in macos when visibility is hidden
2025-09-30 14:41:30 +02:00
Matej Kenda
90e081957d enh(MongoDB): Improve stability of the OpMsgCursor. 2025-09-26 16:55:35 +02:00
Miko
041e7feeb7 Add support for modules (#4999)
* Add support for modules

* Use "" for inclusion

* Fix missing includes on Poco.Data module

* Add PDF and SevenZip modules, and match modules to build macros

* Add CI test

* Add missing link libraries in CMake

* Add remaining libraries DNSSD, CppParser and CppUnit. Changed some static declarations to inline to export

* We also need to forward the ENABLE_NETSSL_* macros

* Update CMakeLists files

* Add samples as requested, with DateTime and URI test for example

* Fix POCO_MODULES_INSTALL macro

* chore(CMake): Combine install macro for libraries and C++ modules into one macro.

* Apply testsuite changes and address include directories concerns

* Restore accidentally deleted build files

* Mistakenly added a file generated by CMake, removed.

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2025-09-19 19:46:36 +02:00
Matej Kenda
e2920f36da Find certificate from Windows store using its thumbprint (replaces PR #2125) (#5023)
* Find certificate from Windows store using its thumbprint

* Address review comments

---------

Co-authored-by: Hussein Ismail <hussein.ismail@m-files.com>
2025-09-12 11:30:28 +02:00
Matej Kenda
dbc800083e fix(Net): Add missing Net_API to Poco::Net::htmlize(const std::string&); 2025-09-12 11:00:16 +02:00
Matej Kenda
7a23a039f9 Reorganise external libs to separate subdirectory (#4996)
* chore(PCRE): properly detect library type on newer macOS

* chore(ZLIB): move source files to own zlib directory and update CMake files.

* chore(PCRE): move source files to own pcre2 directory and update CMake files.

* chore(UTF8PROC): move source files to own utf8proc directory and update CMake files.

* chore(ZLIB): remove header files

* chore(PDJSON): move source files to own pdjson directory and update CMake files.

* chore(SQLite3): move source files to own sqlite3 directory and update CMake files.

* chore(UNBUNDLED): Correct includes.

* chore(expat): move source files to own expat directory and update CMake files.

* chore(wepoll): move source files to own wepoll directory and update CMake files.

* chore(7zip): move source files to own 7zip directory and update CMake files.

* chore(CMake): fix compile and link flags for dependent static libraries

* chore(CMake): set PCRE2_STATIC when building PCRE2.

* chore(SQLite3): Set SQLITE_THREADSAFE for unbundled build, add warnings.

* chore(CMake): Modifications to build and link properly static target libraries (using OBJECT library type and link using BUILD_LOCAL_INTERFACE)

* chore(CMake): fix order of includes in main CMakeLists.txt.

* chore(CI): Build mysql tests with cmake.

* chore(CI): Build mongodb, redis, sqlite no parser tests with cmake.

* chore(CI): Build odbc tests with cmake.

* chore(CI): Build more ations with cmake, other fixes.

* chore(CI): Fixes for macOS

* chore(CMake): extract hpdf and png files to own directories in dependencies

* fix(CMake): include dependencies after all module dependencies are resolved.

* fix(CMake): Improve dependency handling of dependencies to compile them only when necessary.

* fix(CMake): PDF: move t4.h to proper directory, modify include.

* fix(CMake): Fixes to link properly on all platforms.

* fix(CMAKE): Wrong ENABLE for SQLITE

* enh(PDF): Remove dependencies on hpdf headers from Poco::PDF interface and make usage of hpdf only internal.

* enh(CI): Convert more jobs to use cmake.

* enh(CI): Convert macOS sanitizer jobs to use cmake.

* enh(mkrelease): Copy dependencies when creating release package.

* eng(CMake): Add missing POCO_SO option to enable/disable small object optimization.

* enh(CI): Run linux sanitizer with cmake, various fixes and improvements.

* fix(CMake): bundled build: ZLIB::ZLIB is already linked with Foundation, no need to link again to Poco::Zip

* fix(CI): vptr undefined sanitizer causes foundation tests to fail when linking, disable it

* chore(tests): Minor code improvements.

* fix(AsyncNotificationCenter): fix a data race with member _listsEmpty by making it atomic.

* eng(CI): Add a few more time sensitive tests to cppignore.lnx

* chore(Thread): Code updates.

* eng(CI): Add a few more time sensitive tests to cppignore.lnx

* fix(AsyncNotificationCenter): must join threads to avoid data race in dtor.

* chore(CI): Pass TSAN_OPTIONS to jobs where necessary

* chore(CI): run rests without sudo, compile with parallelism

* chore(CI): Use POCO_MINIMAL_BUILD to simplify CMake configure lines.

* chore(CI): Add 32-bit Windows VS build

* chore(CMake): Printout cmake generator platform.

* chore(CMake): linux-gcc-make-armv7l -> linux-gcc-cmake-armv7l

* chore(ci): windows-2025-msvc-cmake-32bit -> windows-2025-msvc-cmake-Win32

* chore(CI): Convert all remaining jobs to CMake.

* chore(make): Prevent building with make.

* chore(CodeQL): exclude all external code from CodeQL checks.

* chore(macOS): Set min support version to 13.3 to properly support C++20 standard.
2025-09-11 17:11:29 +02:00
Karthik Bhat A
ac270824ad Pass pServerCert->hCertStore for hAdditionalStore argument in CertGetCertificateChain call 2025-09-11 13:56:28 +02:00
Matej Kenda
463f06651a chore(CodeQL): exclude all external code from CodeQL checks. 2025-09-11 11:01:17 +02:00
Matej Kenda
41f045c271 fix(NumberFormatter): Add HEX_ to number formatting options to avoid name conflicts with other libraries. 2025-09-11 10:37:25 +02:00
Matej Kenda
d16161322e chore(ODBC): Remove redundant code. 2025-09-11 10:25:40 +02:00
Matej Kenda
930ad02f34 fix(MongoDB): Properly use autoAuthorize instead of authAuthorize (#4969) 2025-09-11 10:21:26 +02:00
Matej Kenda
28467cdcca fix(Data Preparator): Handle UUID type properly in prepareImpl. (#5018) 2025-09-11 10:16:31 +02:00
Aleksandar Fabijanic
7add38041d fix(Data/ODBC): Oracle DB Integers #5002 (#5003) 2025-09-11 10:13:52 +02:00
Matej Kenda
a6a23c31d9 fix(Bugcheck): remove redundant trailing ; (#5004) 2025-09-11 10:02:36 +02:00
siren186
a31dbe6842 fix(Thread): fix Thread reuse error, add thread interrupt feature (#4942)
* enh(Thread): add thread interrupt feature

* fix(Thread): fix Thread reuse error
2025-09-11 09:35:23 +02:00
Matej Kenda
e6f661d313 chore(deprecated): Describe deprecation reasons and alternatives. 2025-09-11 09:25:01 +02:00
Andrew Auclair
8249c68885 Add Deprecation Reasons
Add reasons to some of the deprecations. There are several others without reasons, but I couldn't find a clear answer from the code, so I've left those blank.
2025-09-11 08:40:42 +02:00
siren186
85d96430a6 enh(ScopedLock): ScopedLock add std::adopt_lock_t, std::try_to_lock_t, std::defer_lock_t 2025-09-11 08:27:08 +02:00
Matej Kenda
317ce8aae8 CMake minimal build and dependencies (#5013) 2025-09-06 13:34:59 +02:00
Matej Kenda
5886ee818d chore(CMake): OpenSSL workaround is necessary only for ARM Windows. 2025-08-27 13:31:29 +02:00
Matej Kenda
dc1c8e1cd5 chore(CppUnit): Install headers and libraries. 2025-08-19 18:17:02 +02:00
Matej Kenda
85bc59b6dd chore(CMake): Allow building CppUnit without building unit tests. 2025-08-19 17:56:41 +02:00
Andrew Auclair
20c993b819 New SQLite Only Unbundled Option (#4983)
* New SQLite Only Unbundled Option

A new option to use an unbundled (external) SQLite but all other dependencies internal.

* Match Other Option Styles

Force the POCO_SQLITE_UNBUNDLED option to ON when POCO_UNBUNDLED is on. Switching to this style to match the rest of the Poco cmake options.
2025-08-12 08:47:20 +02:00
Matej Kenda
8e295ca01d chore(CI): Fix installation of Microsoft ODBC connector. 2025-08-10 12:16:45 +02:00
Gleb Popov
8011860b27 Enable Avahi support on FreeBSD
Avahi is expected to be present on any Unix-like OS, like Linux or BSDs, so
change the condition to have these OSes in the else branch.
2025-08-10 09:40:11 +02:00
Gleb Popov
2af85b90bf Teach FindApache2.cmake to locate Apache on FreeBSD 2025-08-10 09:38:21 +02:00
Gleb Popov
d908da01a2 Enable building Poco::Trace on FreeBSD 2025-08-10 09:32:01 +02:00
Gleb Popov
675f73fced Fix building of FileStreamTest.cpp on FreeBSD
According to POSIX, S_IRGRP et all are defined in sys/stat.h, so the code
that uses these defines should include that header
2025-08-10 09:30:20 +02:00
cliu
f43aec0cab fix(pr4979): add missing line of code into the entry of test suite 2025-08-08 22:55:53 +02:00
cliu
72dfce4239 feat(data): add implementation of bulkbinding uuid containers for odbc binder. 2025-08-08 22:55:53 +02:00