forked from pool/cpp-httplib
- update to 0.18.0:
* httplib.h: support LibreSSL * Nice way to call "handle_file_request" from user code * How to diagnose the infamous read error 4 * Made default server and client read/write timeout settings separately * Slow performance caused by get_remote_ip_and_port and get_local_ip_and_port * Provides a way to ignore host verify * add API support for verify certificate manually - update to 0.17.3: * Accessing Directory * ‘constexpr’ error * Only match path params that span full path segment * Fix KeepAliveTest.SSLClientReconnectionPost problem - update to 0.17.2: * Fix incorrect handling of Expect: 100-continue * Peformance improvement by removing tolower function call - update to 0.17.1: * Header parser incorrectly accepts NUL and CR within header values * Fix problem with Abstract Namespace Unix Domain * Fix SIGINT problem in Docker image - update to 0.17.0: * Changed CPPHTTPLIB_KEEPALIVE_MAX_COUNT to 100 * Add Dockerfile for static file server * Breaking Change!: get_header_ methods on Request and Response now take… * Add sleep in handle_EINTR * Added set_ipv6_v6only method * impossible to shut down the server safely * Performance: reserve body to avoid frequent reallocations and copies - update to 0.16.3: * Fixed set_connection_timeout() unexpected results OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cpp-httplib?expand=0&rev=21
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.osc
|
||||||
3
_service
Normal file
3
_service
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<services>
|
||||||
|
<service name="download_files" mode="manual"/>
|
||||||
|
</services>
|
||||||
3
cpp-httplib-0.15.1.tar.gz
Normal file
3
cpp-httplib-0.15.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8d6a4a40ee8fd3f553b7e895882e60e674bd910883fc1857587dbbabee3cdb91
|
||||||
|
size 1151103
|
||||||
3
cpp-httplib-0.18.0.tar.gz
Normal file
3
cpp-httplib-0.18.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6ed5894bbbc4a34a0f4c5e962672d0003d2ea099bbadacc66f6dee2b213ff394
|
||||||
|
size 1321763
|
||||||
208
cpp-httplib.changes
Normal file
208
cpp-httplib.changes
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Sep 22 16:50:33 UTC 2024 - Richard Rahl <rrahl0@opensuse.org>
|
||||||
|
|
||||||
|
- update to 0.18.0:
|
||||||
|
* httplib.h: support LibreSSL
|
||||||
|
* Nice way to call "handle_file_request" from user code
|
||||||
|
* How to diagnose the infamous read error 4
|
||||||
|
* Made default server and client read/write timeout settings separately
|
||||||
|
* Slow performance caused by get_remote_ip_and_port and get_local_ip_and_port
|
||||||
|
* Provides a way to ignore host verify
|
||||||
|
* add API support for verify certificate manually
|
||||||
|
- update to 0.17.3:
|
||||||
|
* Accessing Directory
|
||||||
|
* ‘constexpr’ error
|
||||||
|
* Only match path params that span full path segment
|
||||||
|
* Fix KeepAliveTest.SSLClientReconnectionPost problem
|
||||||
|
- update to 0.17.2:
|
||||||
|
* Fix incorrect handling of Expect: 100-continue
|
||||||
|
* Peformance improvement by removing tolower function call
|
||||||
|
- update to 0.17.1:
|
||||||
|
* Header parser incorrectly accepts NUL and CR within header values
|
||||||
|
* Fix problem with Abstract Namespace Unix Domain
|
||||||
|
* Fix SIGINT problem in Docker image
|
||||||
|
- update to 0.17.0:
|
||||||
|
* Changed CPPHTTPLIB_KEEPALIVE_MAX_COUNT to 100
|
||||||
|
* Add Dockerfile for static file server
|
||||||
|
* Breaking Change!: get_header_ methods on Request and Response now take…
|
||||||
|
* Add sleep in handle_EINTR
|
||||||
|
* Added set_ipv6_v6only method
|
||||||
|
* impossible to shut down the server safely
|
||||||
|
* Performance: reserve body to avoid frequent reallocations and copies
|
||||||
|
- update to 0.16.3:
|
||||||
|
* Fixed set_connection_timeout() unexpected results
|
||||||
|
* Fix KeepAliveTest.SSLClientReconnectionPost
|
||||||
|
- update to 0.16.2:
|
||||||
|
* threadsafe CLOEXEC on platforms that support it
|
||||||
|
* BoringSSL compatibility fixes
|
||||||
|
- update to 0.16.1:
|
||||||
|
* detail::is_socket_alive() is not work for https connection
|
||||||
|
* avoid memory leaks if linked with static openssl libs
|
||||||
|
* Allow hex for ipv6 literal addr in redirect
|
||||||
|
* Fix build on Windows with no WINAPI_PARTITION_APP support
|
||||||
|
* test: fix GetRangeWithMaxLongLength on 32 bit machines
|
||||||
|
* Require a minimum of TLS 1.2
|
||||||
|
- update to 0.16.0:
|
||||||
|
* Use final keyword for devirtualization
|
||||||
|
* FindBrotli cleanup & fixes
|
||||||
|
* client can't open the encrypted private key
|
||||||
|
* build(meson): generate new test PEMs
|
||||||
|
* Fix range parser when parsing too many ranges
|
||||||
|
* fix: increase default receive buffer to 16kb
|
||||||
|
* Removed excess usage of std::move
|
||||||
|
* Merge branch 'HerrCai0907-fix'
|
||||||
|
* Highlight notes using markdown features
|
||||||
|
* Added progress to POST, PUT, PATCH and DELETE requests
|
||||||
|
* Tweak CI & fix macOS prefix
|
||||||
|
* New function SSLServer::update_certs. Allows to update certificates while server is running
|
||||||
|
* Change library name to cpp-httplib
|
||||||
|
- update to 0.15.3:
|
||||||
|
* Breaking change in handling requests with Range in v0.15.1 and v0.15.2
|
||||||
|
- update to 0.15.2:
|
||||||
|
* Severe directory traversal vulnerability (dotdotslash)
|
||||||
|
- switch to cmake build system
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 2 17:01:44 UTC 2024 - Alexey Svistunov <svalx@svalx.net>
|
||||||
|
|
||||||
|
- Update to version 0.15.1:
|
||||||
|
* Malicious requests for many overlapping byte ranges of large files risk OOM #1766
|
||||||
|
* Add missing #include for strcasecmp #1744
|
||||||
|
* ThreadPool: optional limit for jobs queue (#1741)
|
||||||
|
* Fix #1628 (OpenSSL 1.1.1 End of Life on September 11, 2023)
|
||||||
|
* Fix Windows std::max macro problem #1750
|
||||||
|
* Fix select() return code for fd >= 1024 (#1757)
|
||||||
|
* Add a getter for a bearer token from a request (#1755)
|
||||||
|
* Support move semantics for Response::set_content() (#1764)
|
||||||
|
* Treat paths with embedded NUL bytes as invalid (#1765)
|
||||||
|
* Fix usage of rand() is not seeded and depends on seeding by parent program #1747
|
||||||
|
* Fix check request range and fix response Content-Range. #1694
|
||||||
|
* Fix: Query parameter including query delimiter ('?') not being parsed properly (#1713)
|
||||||
|
* Fix #1736
|
||||||
|
* Fix #1665
|
||||||
|
* Change some of status messages based on RFC 9110 (#1740)
|
||||||
|
* Add StatusCode enum (#1739)
|
||||||
|
* Fix #1738
|
||||||
|
* Fix #1685
|
||||||
|
* Fix #1724
|
||||||
|
* Add optional user defined header writer #1683
|
||||||
|
* Fix CPPHTTPLIB_ALLOW_LF_AS_LINE_TERMINATOR (#1634)
|
||||||
|
* Avoid a -Warray-bounds false positive in GCC 13. (#1639)
|
||||||
|
* Fix #1638
|
||||||
|
* Removed unnecessary CRLF at the end of multipart ranges data
|
||||||
|
* Fix #1559
|
||||||
|
* Use memory mapped file for static file server (#1632)
|
||||||
|
* Fix #1519
|
||||||
|
* Fix #1590 (#1630)
|
||||||
|
* Fix #1619
|
||||||
|
* Fix #1624
|
||||||
|
* Compiler freezes on Debian 10 (buster) with GCC 8.3.0 #1613
|
||||||
|
* Don't overwrite the last redirected location (#1589) # This is a breaking change.
|
||||||
|
* Fix #1607
|
||||||
|
* Add named path parameters parsing (Implements #1587) (#1608)
|
||||||
|
* Result: allow default constructor (#1609)
|
||||||
|
* Add support for zOS (#1581)
|
||||||
|
* Provide a CMake option to disable C++ exceptions (#1580)
|
||||||
|
* Load in-memory CA certificates (#1579)
|
||||||
|
- Requires OpenSSL version to 3.0 or later
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 31 07:10:55 UTC 2023 - Alexey Svistunov <svalx@svalx.net>
|
||||||
|
|
||||||
|
- Update to version 0.12.5:
|
||||||
|
* Add HTTPLIB_INSTALL CMake option (#1575)
|
||||||
|
* Fix more CRLF injection problems
|
||||||
|
* Don't loading system certs from Keychain on iOS (#1546)
|
||||||
|
* Initialize sockaddr_un to fix valgrind uninitialised byte message. (#1547, #1547)
|
||||||
|
* Using set_content_provider with length of 0 makes it infinitely loop (#1545)
|
||||||
|
* How to check if server is running successfully in another thread? (#1548)
|
||||||
|
* Fix leaked handle in create_socket (#1554)
|
||||||
|
* Fix "Location" header url corrupted by percent-unescaping in redirect… (#1459)
|
||||||
|
* Trailing headers not handled (#1486)
|
||||||
|
* SSL access through a proxy causes SIGSEGV (#1533)
|
||||||
|
* System certs support on macOS (#1474)
|
||||||
|
* Add Request::get_file_values method (#1495)
|
||||||
|
* Fix: assert socket_requests_are_from_thread_ std::this_thread::get_id() (#1498)
|
||||||
|
* Fix: multipart Content-Type headers with both boundary and charset parameters (#1516)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 16 07:01:16 UTC 2023 - Alexey Svistunov <svalx@svalx.net>
|
||||||
|
|
||||||
|
- Move examples to devel subpackage
|
||||||
|
- Drop headers-only flavor and remove aliases for pkg-config files
|
||||||
|
(gh#yhirose/cpp-httplib#1491)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 09 12:34:29 UTC 2023 - Alexey Svistunov <svalx@svalx.net>
|
||||||
|
|
||||||
|
- Update to version 0.12.0:
|
||||||
|
* Removed is_writable() from DataSink (Resolve #1478, too) (#1483)
|
||||||
|
* Fix #1479
|
||||||
|
* Removed incorrect comment
|
||||||
|
* Support CTest (#1468)
|
||||||
|
* Issue 52666: cpp-httplib:server_fuzzer: Timeout in server_fuzzer
|
||||||
|
* add to_human_string (#1467)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 8 14:55:18 UTC 2023 - Alexey Svistunov <svalx@svalx.net>
|
||||||
|
|
||||||
|
- Switch to meson tests
|
||||||
|
- Add examples to headers package
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 6 14:55:29 UTC 2023 - Alexey Svistunov <svalx@svalx.net>
|
||||||
|
|
||||||
|
- For an explicit choice when buildtime dependencies resolving
|
||||||
|
added an unique pkgconfig files aliases for both shipped library
|
||||||
|
flavors: cpp-httplib-headers.pc and cpp-httplib-shared.pc
|
||||||
|
- Enable tests performing for compiled flavor
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 24 20:14:49 UTC 2023 - Alexey Svistunov <svalx@svalx.net>
|
||||||
|
|
||||||
|
- Migrate from obscpio to classical tar.gz sources archive for properly
|
||||||
|
debugsource package building
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jan 17 10:14:59 UTC 2023 - Alexey Svistunov <svalx@svalx.net>
|
||||||
|
|
||||||
|
- Update to version 0.11.4:
|
||||||
|
* add support for requests with both MultipartFormDataItems and Content Providers (#1454)
|
||||||
|
* Add EINTR and EAGAIN judge for accept (#1438)
|
||||||
|
* Updated unit test
|
||||||
|
* std::condition_variable::notify_one/all() should be called after unlocking mutex (#1448)
|
||||||
|
* Support LOCAL_ADDR and LOCAL_PORT header in client Request (#1450)
|
||||||
|
* Fix #1442
|
||||||
|
* Removed code for upsupported OpenSSL
|
||||||
|
- Combined multibuild cpp-httplib and cpp-httplib-headers packages
|
||||||
|
- Remove unneeded BuildRequires for cpp-httplib-headers
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jan 16 17:53:43 UTC 2023 - Alexey Svistunov <svalx@svalx.net>
|
||||||
|
|
||||||
|
- Move LICENSE file to the library package
|
||||||
|
- Drop cmake BuildRequires and linker additional "-s" flag
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jan 2 11:26:02 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- Redo description so it does not rely on monospace formatting.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 26 10:41:44 UTC 2022 - Alexey Svistunov <svalx@svalx.net>
|
||||||
|
|
||||||
|
- Move README.md to devel subpackage
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 26 09:13:54 UTC 2022 - svalx@svalx.net
|
||||||
|
|
||||||
|
- Update to version 0.11.3:
|
||||||
|
* Fix #1426
|
||||||
|
* Fix #1437
|
||||||
|
* Windows CMake directory install fix (#1434)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 23 08:53:05 UTC 2022 - Alexey Svistunov <svalx@svalx.net>
|
||||||
|
|
||||||
|
- Initial release
|
||||||
|
|
||||||
12
cpp-httplib.pc
Normal file
12
cpp-httplib.pc
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
prefix=/usr
|
||||||
|
includedir=${prefix}/include
|
||||||
|
libdir=${prefix}/lib64
|
||||||
|
|
||||||
|
Name: cpp-httplib
|
||||||
|
Description: A C++ HTTP/HTTPS server and client library
|
||||||
|
URL: https://github.com/yhirose/cpp-httplib
|
||||||
|
Version: 0.0.0
|
||||||
|
Requires.private: openssl >= 3.0.0, zlib, libbrotlicommon, libbrotlidec, libbrotlienc
|
||||||
|
Libs: -L${libdir} -lcpp-httplib
|
||||||
|
Libs.private: -pthread
|
||||||
|
Cflags: -I${includedir} -DCPPHTTPLIB_OPENSSL_SUPPORT -DCPPHTTPLIB_ZLIB_SUPPORT -DCPPHTTPLIB_BROTLI_SUPPORT
|
||||||
110
cpp-httplib.spec
Normal file
110
cpp-httplib.spec
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
#
|
||||||
|
# spec file for package cpp-httplib
|
||||||
|
#
|
||||||
|
# Copyright (c) 2024 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define sover 0.18
|
||||||
|
%define libver 0_18
|
||||||
|
Name: cpp-httplib
|
||||||
|
Version: 0.18.0
|
||||||
|
Release: 0
|
||||||
|
Summary: A C++11 HTTP/HTTPS server and client library
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/yhirose/cpp-httplib
|
||||||
|
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
Source1: %{name}.pc
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: pkgconfig(gtest)
|
||||||
|
BuildRequires: pkgconfig(libbrotlicommon)
|
||||||
|
BuildRequires: pkgconfig(libbrotlidec)
|
||||||
|
BuildRequires: pkgconfig(libbrotlienc)
|
||||||
|
BuildRequires: pkgconfig(libcurl)
|
||||||
|
BuildRequires: pkgconfig(openssl) >= 3.0.0
|
||||||
|
BuildRequires: pkgconfig(zlib)
|
||||||
|
|
||||||
|
%package -n lib%{name}%{libver}
|
||||||
|
Summary: A C++11 HTTP/HTTPS library
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: A C++11 HTTP/HTTPS library
|
||||||
|
Requires: lib%{name}%{libver} = %{version}
|
||||||
|
Conflicts: cpp-httplib-headers-devel
|
||||||
|
|
||||||
|
%description
|
||||||
|
This is a multi-threaded HTTP library with blocking I/O. There is no
|
||||||
|
support for non-blocking mode.
|
||||||
|
|
||||||
|
%description -n lib%{name}%{libver}
|
||||||
|
This is a multi-threaded HTTP library with blocking I/O. There is no
|
||||||
|
support for non-blocking mode.
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This is a multi-threaded HTTP library with blocking I/O. There is no
|
||||||
|
support for non-blocking mode.
|
||||||
|
|
||||||
|
It features built-in mappings, static file server, pre-routing and
|
||||||
|
post-routing handlers, and support for binding sockets to multiple
|
||||||
|
interfaces and any available port.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup
|
||||||
|
chmod -x example/uploader.sh
|
||||||
|
|
||||||
|
# fix dynamically the version in the pkgconfig file
|
||||||
|
sed -i 's|Version: 0.0.0|Version: %{version}|g' %{SOURCE1}
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cmake \
|
||||||
|
-DBUILD_SHARED_LIBS=ON \
|
||||||
|
-DHTTPLIB_REQUIRE_OPENSSL=ON \
|
||||||
|
-DHTTPLIB_REQUIRE_ZLIB=ON \
|
||||||
|
-DHTTPLIB_REQUIRE_BROTLI=ON \
|
||||||
|
-DHTTPLIB_COMPILE=ON \
|
||||||
|
-DHTTPLIB_TEST=ON \
|
||||||
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||||
|
%cmake_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%cmake_install
|
||||||
|
install -Dm0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
|
||||||
|
|
||||||
|
#remove files
|
||||||
|
rm -r %{buildroot}%{_datadir}/licenses/httplib
|
||||||
|
rm %{buildroot}%{_datadir}/doc/packages/cpp-httplib/README.md
|
||||||
|
|
||||||
|
%check
|
||||||
|
# OBS and chroot build environments does not provide internet
|
||||||
|
# connectivity, skip online tests to avoid failures
|
||||||
|
%ctest --parallel 1 --exclude-regex '(_Online$|SSLClientServerTest|MultipartFormDataTest)'
|
||||||
|
%ctest --parallel 1 --tests-regex SSLClientServerTest || :
|
||||||
|
|
||||||
|
%ldconfig_scriptlets -n lib%{name}%{libver}
|
||||||
|
|
||||||
|
%files -n lib%{name}%{libver}
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.md
|
||||||
|
%{_libdir}/lib%{name}.so.%{sover}
|
||||||
|
%{_libdir}/lib%{name}.so.%{version}
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%doc README.md example
|
||||||
|
%{_libdir}/lib%{name}.so
|
||||||
|
%{_includedir}/httplib.h
|
||||||
|
%{_libdir}/cmake/httplib
|
||||||
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
|
|
||||||
|
%changelog
|
||||||
Reference in New Issue
Block a user