Commit Graph

5918 Commits

Author SHA1 Message Date
Aleksandar Fabijanic
0bce71de24
ProcessRunner erases its PID file name #4648 (#4649) 2024-09-11 20:01:52 +02:00
siren186
2812dd7049
enh(Application): add ignoreUnknownOptions() function (#4661)
* enh(Application): remove useless function

* enh(Application): add ignoreUnknownOptions() function

* fix(OptionSet): comment error

* enh(Application): public two functions: getApplicationPath/getApplicationDirectory

* enh(Application): make findAppConfigFile function public and virtual

* style(Application): code alignment

* fix(Application): do not re-throw exception
2024-09-11 19:55:29 +02:00
Aleksandar Fabijanic
6a6c5f7188
feat(build): Add prebuild action to make build #4632 (#4675) 2024-09-11 19:40:26 +02:00
Aleksandar Fabijanic
50199d2865
chore(CI): remove duplicate conflicting PDF defines (#4672) 2024-09-10 21:23:01 +02:00
siren186
201d32137b
fix(build): Foundation VS project files (#4660) 2024-09-10 16:52:05 +02:00
Matej Kenda
91c256095f
enh(FileStream): Add FileStreamBuf::resizeBuffer to set larger internal buffers. (#4621)
Larger buffers improve performance significantly when streaming large quantity of data on very fast devices.
2024-09-09 17:33:50 +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
siren186
73df3689bf
enh(Poco::ActiveThreadPool): make it easy to use correctly (#4624)
* make Poco::ActiveThreadPool easy to use (#4544)

* code format

* Fix ThreadSanitizer thread leak error

* enh(ActivePooledThread): Change pointers to references

* enh(ActivePooledThread): remove unused method

* enh(Poco::ActiveThreadPool): Use std::unique_ptr instead of raw pointer

* enh(Poco::ActiveThreadPool): Use C++ static_cast instead of C casting

* enh(Poco::ActiveThreadPool): Use standard containers instead of implementing own

* enh(Poco::ActiveThreadPool): Change pointer to reference

* enh(Poco::ActiveThreadPool): Use smart pointers instead of bare pointers

* enh(Poco::ActiveThreadPool): Fix codeql warning: A stack address which arrived via a  may be assigned to a non-local variable.

* enh(Poco::ActiveThreadPool): More test case

* enh(Poco::ActiveThreadPool): std::optional::value unavailable on earlier macOS versions

* enh(Poco::ActiveThreadPool): Fix compare function for make heap

* enh(Poco::ActiveThreadPool): Add more test case

* enh(Poco::ActiveThreadPool): Add more test case

* enh(Poco::ActiveThreadPool): Code style

* enh(Poco::ActiveThreadPool): Test case

* enh(Poco::ActiveThreadPool): Test case

* enh(Poco::ActiveThreadPool): Fix test case error

* Revert "enh(Poco::ActiveThreadPool): std::optional::value unavailable on earlier macOS versions"

This reverts commit cba4673b47.

* enh(macOS): require min deployment macOS version 10.15 which has full support for C++17

* enh(Poco::ActiveThreadPool): Remove useless "{}"

* enh(Poco::ActiveThreadPool): Rename member variable m_impl to _impl

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2024-08-30 11:54:44 +02:00
siren186
aa8084c6a0
enh(ScopedLockWithUnlock): make it more alike std::unique_lock (#4652) 2024-08-29 22:03:33 +02:00
Dan Rosser
6d2b26645a
LibPNG Unbundled (#4657) 2024-08-29 13:46:31 +02:00
Étienne Dupuis
63bed8c8d3 Use Int64 for TcpServerDispatcher::totalConnections(), to prevent overflow 2024-08-26 16:06:47 +02:00
siren186
e4aaeacea8
fix(HelpFormatter): lost one space between key and value (#4631) 2024-08-17 07:57:09 +02:00
Matej Kenda
7345bf34f9
fix(SimpleFileChannel): unify default "flush" to be false as it is in "FileChannel" (#4591) (#4622) 2024-08-17 07:31:06 +02:00
tbeu
4099780f0a Fix const-correctness 2024-08-14 12:25:35 +02:00
Matej Kenda
1eebd46c04
Cppunit and data test enhancements (#4616)
* enh(CppUnit): Source code enhancements.

* enh(DataTest): Code enhancements (mostly to use override) to prevent wrong test calls when renaming.
2024-07-30 15:09:58 +02:00
Aleksandar Fabijanic
669be63134
Allow set enum as json value (#4363) (#4434)
* Allow set enum as json value (#4363)

* fix issue #4341
add testEnum
if you set enum as json value then it will be cast to int

* add behavour for enum into VarHolderImpl
add tests for enum classes with differnent underline integral types

* replace static_cast with convertTo* methods, they can chaeck types and
limits

* fix missing types for convert methods

* fix code style
add testEnumType to the VarTest.cpp, extract() works

* enh(VarHolder): replace ::value and ::type with shortcuts

---------

Co-authored-by: Alexander B <ale.bychuk@gmail.com>
2024-07-29 23:30:51 +02:00
Matej Kenda
03444bdcea enh(CI): Add unbundled build on Linux. 2024-07-29 21:06:40 +02:00
Aleksandar Fabijanic
3656f069e1
enh(ProcessRunner): does not detect launch errors #4482 (#4483)
* enh(ProcessRunner): does not detect launch errors #4482

* enh(File): add absolutePath and existsAnywhere() #4482

* fix windows build and tsan fail

* fix tsan

* fix windows file tests

* comment out some CI env path -related issues

* fix tsan and windows build

* try to fix ci

* ignore ProcessRunner test fail on windows cmake

* enh(File): canExecute throws FileNotFoundException if the file to be executed can't be found in the path.

* Few C++ modernisation changes.

* enh(File): Windows specifics of File::canExecute. Returns false if the file to be executed can't be found using absolutePath.

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2024-07-29 20:16:18 +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
Matej Kenda
5117e27515
Usage modern C++ features on JSON modules (enhanced) (#4613) 2024-07-25 18:18:37 +02:00
Marc Schlatter
891c1e03bf
Display proper digest name when digest is not found (#4588) 2024-07-24 13:06:25 +02:00
Aleksandar Fabijanic
7064ae3c2d
4368 fix oracle failing odbc tests (#4611)
* chore(CI): enable oracle ODBC tests #4368

* fix(ODBC): Oracle AutoTransaction test case; add explicit ODBC exceptions instantiation #4368

* fix(odbc): oracle test table creation error detection #4368

* enh(Data): enforce sql parsing for transaction tests to avoid select-only transactions #4368

---------

Co-authored-by: cunj123 <n.belusic@pta.hr>
2024-07-24 13:05:08 +02:00
Alexander B
a6762f51cf
fix #4576 (#4595)
Resolve unresolved macro _NTO_THREAD_NAME_MAX and undeclared array tName
2024-07-24 10:30:32 +02:00
Aleksandar Fabijanic
1edabc19d8 seekg position should be relative to beginning #4413 aleph-us/devs#397 2024-07-18 14:21:30 +02:00
Aleksandar Fabijanic
ed181d99dc
4529 sql logger shutdown (#4530)
* enh(ThreadTest): add join test

* enh(SQLLogger): #4529 (wip)

* enh(SQLChannel): just few C++17 modernisations.

* enh(SQLiteTest): extend unit test to destroy SQL channel while it has pending messages. (#4529)

* enh(ODBC): improve exception descriptions and add string/batch size tests

* feat(SQLChannel): add store-and-forward mode

* fix(DataTest): SQLChannel *nix build and test run #4529

* fix(DataTest): CodeQL warning #4529

* chore(ODBCTest): lower the number of max statements in big batch

* feat(SQLChannel): add flush property #4529

* enh(SQLChannel): use event for interruptible sleep; reduce code duplication with lambda; update comments #4529

* fix(SQLChannel): flush time determination #4529

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2024-07-16 20:03:32 +02:00
lanthora
2442c66f84 Add missing momory header file 2024-07-02 17:18:32 +02:00
Andrew Auclair
a82b766628
DateTimeParser Validation and Performance Improvements (#4593) 2024-06-29 22:13:51 +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
Andrew Auclair
9d739176f6
enh(Cmake) Add CACHE PATH to multi-config output directory variables (#4545)
* Add CACHE PATH to multi-config output directory variables

CACHE PATH should have been added to these as well.

* Adding Config Name to Cache Message

Adding the configuration name to the cache path message that is written to CMakeCache.txt.
2024-06-19 09:34:34 +02:00
Matej Kenda
2681b0a3ac enh(zlib): Upgrade bundled zlib to 1.3.1 (#4585, #4586) 2024-06-18 12:10:27 +02:00
Jouke Witteveen
e00b4de672
Allow ADL for swapping Optional values (#4569)
Some types support being swapped but may not have declared their
std::swap overloads when Poco/Optional.h is first included. This is the
case for instance with

    #include <Poco/Optional.h>
    #include <array>

    using Problematic = Poco::Optional<std::array<int, 42> >;

With an unqualified call to swap, preceded by using std::swap, we allow
argument-dependent lookup to find suitable implementations of swap.
2024-06-17 16:52:49 +02:00
Günter Obiltschnig
c6249d9b3f enh(Net): clear out stored credentials 2024-06-11 12:19:52 +02:00
Günter Obiltschnig
3092ba5455 enh(Foundation): add Poco::secureClear() for securely clearing a string by first overwriting it with zeroes. 2024-06-11 10:42:49 +02:00
Matej Kenda
bc29f30e5c
end(ServerApplication): Add --pid option to ServerApplication on Windows. (#4559) (#4567) 2024-06-02 03:08:18 +02:00
Matej Kenda
cf1a29908a enh(MongoDB): Document::get returns value by const reference instead of creating a copy and few other minor improvements. 2024-05-23 11:46:44 +02:00
Alexander B
4552df2f2e
fix(Logger): Autodetect line number type from __LINE__ (#4553)
MS Visual Studio can use type long for __LINE__ macro when /ZI
compilation flag is used - https://learn.microsoft.com/en-us/cpp/build/
reference/z7-zi-zi-debug-information-format?view=msvc-170#zi-1
This breaks some poco interfaces, for ex. logger
We should fix type for line number
2024-05-15 13:43:24 +02:00
Matej Kenda
ad72b25ace enh: resolve unit test and few other warnings. 2024-05-08 13:25:56 +02:00
Matej Kenda
065f9a0ff9
feature(FileStream): Allow using Poco::FileStream to wrap arbitrary file handles/descriptors as C++ streams (#4424)
* Allow using Poco::FileStream to wrap arbitrary file handles/descriptors as C++ streams (#3444).

* Allow opening a file descriptor/HANDLE as C++ stream.

* FileStream: treat read from closed pipe as EOF.

* chore(Filestream): conde style (naming)

Co-Authored-By: Alex Fabijanic <alex@pocoproject.org>
Co-Authored-By: Matej Kenda <matejken@gmail.com>

* enh(FileStream): make FileIOS::open a virtual function. (#3444)

* test(FileStream): unit test for FileStream::openHandle (#3444)

* Update CONTRIBUTORS.

* test(FileStream): Win32 unit test fix.

* build(CMake): Require policy minimum version 3.15.

---------

Co-authored-by: Daniel Grunwald <grunwald@axivion.com>
Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2024-05-08 11:53:43 +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
6998c66539
Merge pull request #4534 from jeremy-rifkin/main
Remove zero-width space from start of file
2024-04-21 06:54:45 +02:00
Jeremy Rifkin
b1f28c42eb
Remove zero-width space from start of file 2024-04-20 15:42:17 -05:00
Mert Övün
e9f6fc10cc - b master -> -b main 2024-04-18 07:36:25 +02:00
Matej Kenda
f4dba784a4 Update CONTRIBUTING.md for new branching scheme. 2024-04-15 13:11:34 +02:00
Matej Kenda
bd4560123f Sync differences from branch 'master' into 'devel' after release 1.13.3 2024-04-06 10:21:08 +02:00
Alex Fabijanic
534c12415e chore: README 2024-04-03 19:17:40 -05:00
Aleksandar Fabijanic
b41f211ece
2208 merge dnssd (#4479)
* Initial commit

* initial commit

* added README.md

* Update README.md

* Add top level CMakeLists like another project in POCO framework. see #1

* Add CMakeLists to Avahi and Bonjour. (see #1)

* Missing changing in top level CMakeLists correct. (see #1)

* Add samples CMakeLists. (see #1)

* Add temporary cmake find module for Avahi and Bonjour in cmake directory. (see #1)

* Add mandatory requirement diff for POCO framework to DNSSD cmake can be work correctly. (see #1)

* Update README.md

Add cmake build way.

* Update README.md

Minor change.

* Update README.md

Removed ambiguous sentence.

* Moved files

* Add cmake modules

* Add cmake modules

* Remove modules

* Correct linux cmake ci.

* Exclude DNSSD from macos, windows.

* Update CMakeLists.txt

* Remove unused gitignore

* Remove deprecated vs versions

* Add vs160 and vs170 for DNSSD

* Remove deprecated sln

* Revert bad changes

* Revert bad changes

* chore: remove vs90 sln files

* chore: remove vs90 x64 files

* Revert "chore: remove vs90 sln files"

This reverts commit 51d78f82f1.

* chore: add DNSSD to components

* chore(DNSSD): disable in CI, update copyright and doc

* fix(DNSSD): CMake on Apple platforms: fix finding library providing DNSSD.

* fix(DNSSD): Handle kDNSServiceFlagsNonBrowsable that was removed in 1096.0.2

* chore: naming and code modernize review comments

* enh(DNSSD): Define DNSSD_*_API for non-MSVC compilers.

---------

Co-authored-by: Günter Obiltschnig <guenter.obiltschnig@appinf.com>
Co-authored-by:  <soroosh@soroosh-pc.localdomain>
Co-authored-by: Seyyed Soroosh Hosseinalipour <soorosh_abi@hotmail.com>
Co-authored-by: Matej Kenda <matejken@gmail.com>
2024-04-03 22:38:56 +02:00
Günter Obiltschnig
166efc721d fix(release): cpproj must include vcpkg files 2024-04-03 19:58:04 +02:00
Günter Obiltschnig
931dfeae6d doc: updated README[.md] 2024-04-03 17:21:05 +02:00
Günter Obiltschnig
10c3039398 chore(buldwin): remove WEC2013 2024-04-03 14:06:06 +02:00
Günter Obiltschnig
5c2fcedfa1 fix(build): VS project files for MongoDB 2024-04-03 12:54:27 +02:00