Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package cpp-httplib for openSUSE:Factory checked in at 2023-02-16 16:56:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cpp-httplib (Old) and /work/SRC/openSUSE:Factory/.cpp-httplib.new.22824 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cpp-httplib" Thu Feb 16 16:56:58 2023 rev:2 rq:1066113 version:0.12.0 Changes: -------- --- /work/SRC/openSUSE:Factory/cpp-httplib/cpp-httplib.changes 2023-01-25 17:45:47.316894918 +0100 +++ /work/SRC/openSUSE:Factory/.cpp-httplib.new.22824/cpp-httplib.changes 2023-02-16 16:57:00.734978898 +0100 @@ -1,0 +2,32 @@ +Thu Feb 16 07:01:16 UTC 2023 - Alexey Svistunov <sv...@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 <sv...@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 <sv...@svalx.net> + +- Switch to meson tests +- Add examples to headers package + +------------------------------------------------------------------- +Mon Feb 6 14:55:29 UTC 2023 - Alexey Svistunov <sv...@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 + +------------------------------------------------------------------- Old: ---- _multibuild cpp-httplib-0.11.4.tar.gz cpp-httplib-headers.spec New: ---- cpp-httplib-0.12.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cpp-httplib.spec ++++++ --- /var/tmp/diff_new_pack.UP2lzP/_old 2023-02-16 16:57:01.438981712 +0100 +++ /var/tmp/diff_new_pack.UP2lzP/_new 2023-02-16 16:57:01.442981727 +0100 @@ -16,17 +16,18 @@ # -%define sover 0.11 -%define libver 0_11 +%define sover 0.12 +%define libver 0_12 Name: cpp-httplib -Version: 0.11.4 +Version: 0.12.0 Release: 0 Summary: A C++11 HTTP/HTTPS library License: MIT URL: https://github.com/yhirose/cpp-httplib -Source0: %{name}-%{version}.tar.gz +Source0: https://codeload.github.com/yhirose/cpp-httplib/tar.gz/refs/tags/v%{version}#/%{name}-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: meson >= 0.47.0 +BuildRequires: pkgconfig(gtest) BuildRequires: pkgconfig(libbrotlidec) BuildRequires: pkgconfig(libbrotlienc) BuildRequires: pkgconfig(openssl) >= 1.1.1 @@ -57,14 +58,22 @@ %prep %setup -q +chmod -x example/uploader.sh %build -%meson -Dcpp-httplib_compile=true --buildtype=release +%meson -Dcpp-httplib_compile=true -Dcpp-httplib_test=true \ + --buildtype=release %meson_build %install %meson_install +%check +# OBS and chroot build environments does not provide internet +# connectivity, skip online tests to avoid failures +export GTEST_FILTER='-*.*_Online' +%meson_test + %post -n lib%{name}%{libver} -p /sbin/ldconfig %postun -n lib%{name}%{libver} -p /sbin/ldconfig @@ -77,6 +86,6 @@ %{_libdir}/lib%{name}.so %{_includedir}/httplib.h %{_libdir}/pkgconfig/%{name}.pc -%doc README.md +%doc README.md example %changelog ++++++ _service ++++++ --- /var/tmp/diff_new_pack.UP2lzP/_old 2023-02-16 16:57:01.478981871 +0100 +++ /var/tmp/diff_new_pack.UP2lzP/_new 2023-02-16 16:57:01.482981888 +0100 @@ -1,17 +1,4 @@ <services> - <service name="obs_scm" mode="manual"> - <param name="url">https://github.com/yhirose/cpp-httplib.git</param> - <param name="scm">git</param> - <param name="versionformat">@PARENT_TAG@</param> - <param name="versionrewrite-pattern">v(\d.*)</param> - <param name="versionrewrite-replacement">\1</param> - <param name="changesgenerate">enable</param> - </service> - <service name="set_version" mode="manual"/> - <service name="tar" mode="manual"/> - <service name="recompress" mode="manual"> - <param name="file">*.tar</param> - <param name="compression">gz</param> - </service> + <service name="download_files" mode="manual"/> </services> ++++++ cpp-httplib-0.11.4.tar.gz -> cpp-httplib-0.12.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpp-httplib-0.11.4/README.md new/cpp-httplib-0.12.0/README.md --- old/cpp-httplib-0.11.4/README.md 2023-01-24 15:07:42.000000000 +0100 +++ new/cpp-httplib-0.12.0/README.md 2023-02-07 16:27:40.000000000 +0100 @@ -493,6 +493,10 @@ ``` or ```c++ +auto res = cli.Get("/hi", {{"Accept-Encoding", "gzip, deflate"}}); +``` +or +```c++ cli.set_default_headers({ { "Accept-Encoding", "gzip, deflate" } }); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpp-httplib-0.11.4/example/ssesvr.cc new/cpp-httplib-0.12.0/example/ssesvr.cc --- old/cpp-httplib-0.11.4/example/ssesvr.cc 2023-01-24 15:07:42.000000000 +0100 +++ new/cpp-httplib-0.12.0/example/ssesvr.cc 2023-02-07 16:27:40.000000000 +0100 @@ -19,7 +19,7 @@ unique_lock<mutex> lk(m_); int id = id_; cv_.wait(lk, [&] { return cid_ == id; }); - if (sink->is_writable()) { sink->write(message_.data(), message_.size()); } + sink->write(message_.data(), message_.size()); } void send_event(const string &message) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpp-httplib-0.11.4/httplib.h new/cpp-httplib-0.12.0/httplib.h --- old/cpp-httplib-0.11.4/httplib.h 2023-01-24 15:07:42.000000000 +0100 +++ new/cpp-httplib-0.12.0/httplib.h 2023-02-07 16:27:40.000000000 +0100 @@ -8,7 +8,7 @@ #ifndef CPPHTTPLIB_HTTPLIB_H #define CPPHTTPLIB_HTTPLIB_H -#define CPPHTTPLIB_VERSION "0.11.4" +#define CPPHTTPLIB_VERSION "0.12.0" /* * Configuration @@ -340,7 +340,6 @@ std::function<bool(const char *data, size_t data_len)> write; std::function<void()> done; - std::function<bool()> is_writable; std::ostream os; private: @@ -3632,7 +3631,7 @@ data_sink.write = [&](const char *d, size_t l) -> bool { if (ok) { - if (write_data(strm, d, l)) { + if (strm.is_writable() && write_data(strm, d, l)) { offset += l; } else { ok = false; @@ -3641,14 +3640,14 @@ return ok; }; - data_sink.is_writable = [&](void) { return ok && strm.is_writable(); }; - while (offset < end_offset && !is_shutting_down()) { - if (!content_provider(offset, end_offset - offset, data_sink)) { + if (!strm.is_writable()) { + error = Error::Write; + return false; + } else if (!content_provider(offset, end_offset - offset, data_sink)) { error = Error::Canceled; return false; - } - if (!ok) { + } else if (!ok) { error = Error::Write; return false; } @@ -3680,18 +3679,21 @@ data_sink.write = [&](const char *d, size_t l) -> bool { if (ok) { offset += l; - if (!write_data(strm, d, l)) { ok = false; } + if (!strm.is_writable() || !write_data(strm, d, l)) { ok = false; } } return ok; }; data_sink.done = [&](void) { data_available = false; }; - data_sink.is_writable = [&](void) { return ok && strm.is_writable(); }; - while (data_available && !is_shutting_down()) { - if (!content_provider(offset, 0, data_sink)) { return false; } - if (!ok) { return false; } + if (!strm.is_writable()) { + return false; + } else if (!content_provider(offset, 0, data_sink)) { + return false; + } else if (!ok) { + return false; + } } return true; } @@ -3720,7 +3722,10 @@ // Emit chunked response header and footer for each chunk auto chunk = from_i_to_hex(payload.size()) + "\r\n" + payload + "\r\n"; - if (!write_data(strm, chunk.data(), chunk.size())) { ok = false; } + if (!strm.is_writable() || + !write_data(strm, chunk.data(), chunk.size())) { + ok = false; + } } } else { ok = false; @@ -3759,14 +3764,14 @@ } }; - data_sink.is_writable = [&](void) { return ok && strm.is_writable(); }; - while (data_available && !is_shutting_down()) { - if (!content_provider(offset, 0, data_sink)) { + if (!strm.is_writable()) { + error = Error::Write; + return false; + } else if (!content_provider(offset, 0, data_sink)) { error = Error::Canceled; return false; - } - if (!ok) { + } else if (!ok) { error = Error::Write; return false; } @@ -6544,8 +6549,6 @@ return ok; }; - data_sink.is_writable = [&](void) { return ok && true; }; - while (ok && offset < content_length) { if (!content_provider(offset, content_length - offset, data_sink)) { error = Error::Canceled; @@ -6717,7 +6720,6 @@ bool has_data = true; cur_sink.write = sink.write; cur_sink.done = [&]() { has_data = false; }; - cur_sink.is_writable = sink.is_writable; if (!provider_items[cur_item].provider(offset - cur_start, cur_sink)) return false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpp-httplib-0.11.4/test/test.cc new/cpp-httplib-0.12.0/test/test.cc --- old/cpp-httplib-0.11.4/test/test.cc 2023-01-24 15:07:42.000000000 +0100 +++ new/cpp-httplib-0.12.0/test/test.cc 2023-02-07 16:27:40.000000000 +0100 @@ -1650,7 +1650,6 @@ [&](const Request & /*req*/, Response &res) { res.set_chunked_content_provider( "text/plain", [](size_t /*offset*/, DataSink &sink) { - EXPECT_TRUE(sink.is_writable()); sink.os << "123"; sink.os << "456"; sink.os << "789"; @@ -1664,7 +1663,6 @@ res.set_chunked_content_provider( "text/plain", [i](size_t /*offset*/, DataSink &sink) { - EXPECT_TRUE(sink.is_writable()); switch (*i) { case 0: sink.os << "123"; break; case 1: sink.os << "456"; break; @@ -1694,7 +1692,6 @@ res.set_content_provider( data->size(), "text/plain", [data](size_t offset, size_t length, DataSink &sink) { - EXPECT_TRUE(sink.is_writable()); size_t DATA_CHUNK_SIZE = 4; const auto &d = *data; auto out_len = @@ -1714,8 +1711,6 @@ res.set_content_provider( size_t(-1), "text/plain", [](size_t /*offset*/, size_t /*length*/, DataSink &sink) { - if (!sink.is_writable()) return false; - sink.os << "data_chunk"; return true; }); @@ -2952,7 +2947,6 @@ auto res = cli_.Put( "/put", 3, [](size_t /*offset*/, size_t /*length*/, DataSink &sink) { - EXPECT_TRUE(sink.is_writable()); sink.os << "PUT"; return true; }, @@ -2979,7 +2973,6 @@ auto res = cli_.Put( "/put", [](size_t /*offset*/, DataSink &sink) { - EXPECT_TRUE(sink.is_writable()); sink.os << "PUT"; sink.done(); return true; @@ -3006,7 +2999,6 @@ auto res = cli_.Put( "/put", 3, [](size_t /*offset*/, size_t /*length*/, DataSink &sink) { - EXPECT_TRUE(sink.is_writable()); sink.os << "PUT"; return true; }, @@ -3035,7 +3027,6 @@ auto res = cli_.Put( "/put", [](size_t /*offset*/, DataSink &sink) { - EXPECT_TRUE(sink.is_writable()); sink.os << "PUT"; sink.done(); return true;