Commit Graph

839 Commits

Author SHA1 Message Date
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
Andrew Auclair
47c4f073e6
Moving operator<< and operator>> overloads into the Poco::Net namespace. (#4491) 2024-03-28 19:43:14 +01:00
Matej Kenda
482c066307
fix(SecureSocket): Refactor detection of timeout when reading, writing and handshaking (#4510)
* fix(SecureSocket): Refactor detection of timeout when reading, writing or handshaking. (#3725)

* enh(SecureSocket): some trivial C++17 modernisation changes.

* chore: indentation and compiler warning

---------

Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2024-03-27 00:29:58 +01:00
Nicolau Leal Werneck
a5b3c84874
Documentation fixes on DatagramSocket.h and Socket.h (#4489)
* Update DatagramSocket.h

`connect cannot()` -> `connect() cannot`

* Update Socket.h

typo on `setReceiveTiemout`
2024-03-11 10:27:28 +01:00
Matej Kenda
c624b27878 fix(HostEntry): preserve order of addresses and aliases (fixes #3807) 2024-02-28 16:49:26 +01:00
Aleksandar Fabijanic
6b3aab0624 chore(tcpclient): create sample 2024-02-27 12:16:10 +01:00
Aleksandar Fabijanic
3235068545 chore(tcpserver): regenerate vs170 project and add to solution 2024-02-27 11:55:38 +01:00
Günter Obiltschnig
37e17092ff chore: fix vs project files 2024-02-19 22:29:26 +01:00
Alex Fabijanic
30a0a06bac chore(ParallelSocketAcceptor): remove unnecessary include and using from header 2024-02-16 01:00:19 +01:00
Aleksandar Fabijanic
499a7d35f9 fix(build): regenerate VS projects #4453 2024-02-14 00:25:14 +01:00
Aleksandar Fabijanic
c7d16b2a7e
4368 oracle odbc tests (#4410)
* feat(format): Add string_view format type spec #4409

* chore(Types): add demangle

* fix(Data): Oracle failing ODBC tests #4368

* fix some CQL and fuzz warnings; add Var::typeName()

* fix(build): -std=c++17 and c11

* fix windows build

* fix(Foundation): test apps vs projects c++17

* chore(build): remove uneeded compiler flag

* fix(VarHolder): number of digits range check for int->float conversion (reported by CIFuzz)

* fix(test): CIFuzz

* fix(CIFuzz): another attempt

* fix(progen): add LanguageStandard (stdcpp17, stdc11); regenerate vs170 projects

* fix(CiFuzz): add int->float precision loss barrier; fix erroneous number of digits logic

* enh(Var): silent loss of precision on int->float conversion #4423

* enh(Var): silent loss of precision on int->float conversion #4423

* chore(build): remove old build files

* chore: fix missing parens warning

* enh(Thread_POSIX): prevent double-joining; add error description to exceptions

* fix(Data): unresolved Column<long> linkage in test

* fix(demangle): determine type name from template parameter; add eror diagnostic for demangling failures

* chore(buildwin): remove old vs versions from build and progen scripts; update documentation

* chore(buildwin): remove leftover closing curly
2024-01-31 22:07:07 +01:00
Günter Obiltschnig
d5a5ebc2d7 enh: #3890: Get rid of SingletonHolder 2024-01-30 09:56:27 +01:00
Günter Obiltschnig
33638df51e enh: #4216: use std::string literals 2024-01-30 09:35:35 +01:00
Jesse Hoogervorst
5bc04f4c4a
Implemented automated network library initialization for Windows MinGW targets (#4402)
* Implemented automated network library initialization for Windows MinGW/GCC targets

* Using POCO_COMPILER_MINGW instead of __GNUC__

---------

Co-authored-by: Jesse Hoogervorst <jesse@deltaxlab.com>
2024-01-17 14:51:23 +01:00
Aleksandar Fabijanic
b0dc9c5a82
fix(SocketReactorTest): deadlock test intermittently hangs #4400 (#4401) 2024-01-17 09:20:20 +01:00
Matej Kenda
3002777115 fix(MailMessage): Compare lowercase content disposition headers when reading parts (#3650). 2024-01-16 00:49:49 +01:00
Aleksandar Fabijanic
64dbfab0fa
4398 dont install cppunit (#4399)
* chore(SingleSocketPoller): spelling

* fix(CppUnit): do not install #4398

* fix(DataTest): do not install #4398
2024-01-16 00:03:33 +01:00
Matej Kenda
287befc4a3 fix(test): lock std:cerr to prevent data race in TCP server tests (reported by clang thread sanitizer) #4313 2024-01-05 22:57:53 +01:00
Alex Fabijanic
9c7cba6d6c backport leftover 1.12 changes 2023-12-22 20:22:33 +01:00
Kari Argillander
d1d557a4f7 Remove vs140 and vs150 project files
As we now only support C++17 these does not make much sense to keep.
2023-12-18 17:26:13 +01:00
Kari Argillander
bf3c519183
Fix some issues found with clang-tidy (#4353)
* directoryiterator: Fix missing inline

Add missing inline to inline function.

This was found with clang-tidy check:  misc-definitions-in-headers

* Convert deprecated throw() to noexcept

throw() has been deprecated in standar in C++17. It has been removed in
C++20. Code still compiles but let's just define these at those should
be.

These where found with clang-tidy check: modernize-use-noexcept

* Fix unnecessary copy initializations

Clang-tidy did find these with check:

  performance-unnecessary-copy-initialization

* Fix some strings not references

Looks like these are just missing reference marks.

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2023-12-17 16:55:30 +01:00
Matej Kenda
214b54460e mingw 11: fixes to compile common libraries 2023-12-14 19:02:11 +01:00
Kari Argillander
708a5d8307
RFC: Remove Windows CE support (#4342)
* Remove _WIN32_WCE macro

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. First remove
all macro usages from our own files.

* Remove WinCE support from build files

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. Remove all
references from build systems / scripts.

* Remove Windows CE related source and header files

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. First remove
all macro usages from our own files.

* Remove wcelibcex folder

Poco now use C++17 and Windows CE does not support it and VS2017 does
also not support it so we can just remove Windows CE code. First remove
all macro usages from our own files.

* Remove rest Windows CE mentions

There where some Windows CE mentions left. Remove those.

* Update Windows CE documentation

We should keep documentation some time so people can find reason for
remove.

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2023-12-14 00:25:04 +01:00
Kari Argillander
46759cab03
Fix RemoteSyslogChannel setProperty value check (#4339)
We compare just 4 first letters. So if value would have example be
syslevel then this function would work wrong. Nothing major but nice to
fix.

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2023-12-13 03:36:37 +01:00
Matej Kenda
12a99dcd18 fix(SocketImpl): Windows: use pragma to link mswsock.lib 2023-12-12 22:13:00 +01:00
Matej Kenda
54f0feb282 fix(ci): Partially revert "add sendfile method for streamsocket (#4007)"
This reverts commit 24b7122f43.
2023-12-12 22:13:00 +01:00
Alexander B
24b7122f43
add sendfile method for streamsocket (#4007)
* add sendfile method for streamsocket

* add mswsock.lib to the project files and templates

* remove /DPOCO_NO_AUTOMATIC_LIBS for cmake windows build

* merge from upstream

* merge from upstream

* fix code stile
add NotImplemented exception for unsupported platforms
exculude <sys/sendfile.h> for POCO_EMSCRIPTEN, because https://
github.com/emscripten-core/emscripten/pull/16234

* add iostream include for std::cout

* fix compilation for emscripten (wrap sendfile)
2023-12-11 10:47:03 +01:00
Matej Kenda
35e1490b26
fix(platform): Fixes to compile with emscripten 3.1.5 (fixes #2707) (#4318)
* fix(platform): Fixes to compile with emscripten 3.1.5 on Ubuntu 22.04 #2707

* enh(Platform): add test check with emscripten on Linux
2023-12-07 01:48:14 +01:00
Matej Kenda
0e4eb00ea5 enh(Net): fix a typo 2023-12-04 16:56:12 +01:00
Russell Greene
3ae282db2e
enh(Net): Allow passing raw fd's into ServerSocket (#4156)
* Allow creating ServerSocket's from fd's
* more sensible approach
* fix whitespace issue
* add test
* build fixes for windows
2023-12-04 16:53:40 +01:00
chrisbednarski
388a3b4010
fix openssl session resumption, add quiet shutdown option, support FTPS with hostname (#4103) 2023-11-26 18:12:11 +01:00
Aleksandar Fabijanic
11de40399c
fix(sharedMemory): x64 size error #2976 (#4295)
* fix(sharedMemory): x64 size error #2976

* chore: add Util dependency to Prometheus samples

* fix(HTTPClientSession): not working with UNIX_LOCAL SocketAddress #2578

* fix(WebSocketTest): supress connection reset exception assertion

* fix(PollSet): wait on premature epoll_wait return; reinforce tests for windows

* fix(build): add DataTest dependency to Makefile

* fix(Task): intermittently hanging test and some other improvements

* fix(Net): PollSet loop; suppress test WebSocket handler shutdown IOExeption
2023-11-26 04:57:39 +01:00
Matej Kenda
daeb9d7301
4254 net message header optional decoding (#4263)
* GH #4254: Net::MessageHeader: automatic decoding of header values is made optional (enabled by default).

* GH #4254: Net::MessageHeader: test for optional automatic decoding of header values
2023-11-13 10:32:12 +01:00
Aleksandar Fabijanic
264eead095 fix(Net): failing testPollNoServer test on windows 2023-11-06 17:08:29 +01:00
Aleksandar Fabijanic
442be3fe57 fix(ProGen): regen CppUnit and Net VS projects 2023-11-06 17:07:32 +01:00
Aleksandar Fabijanic
78234857bf feat(ProGen): default to c++17 2023-11-05 23:40:47 +01:00
Alex Fabijanic
81d7307fa7 fix(Data):
adjust make and CMake for SQLParser and DataTest lib
separate samples from tests in CMake
remove unused StatementImpl from Data testsuite
2023-11-04 23:11:38 +01:00
Alex Fabijanic
e47b92d641 fix(PollSetTest): avoid looping #1320 2023-10-25 13:19:01 +02:00