git: 0601bd825395 - main - net-p2p/datum_gateway: all bitcoind RPC calls fail with HTTP 400 against libevent 2.1.13
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 07 Oct 2026 10:19:03 UTC
The branch main has been updated by kiwi:
URL: https://cgit.FreeBSD.org/ports/commit/?id=0601bd825395b7a1e6dabed90875467e969473ce
commit 0601bd825395b7a1e6dabed90875467e969473ce
Author: Matt Watson <mattraydub@gmail.com>
AuthorDate: 2026-10-07 10:16:45 +0000
Commit: Xavier Beaudouin <kiwi@FreeBSD.org>
CommitDate: 2026-10-07 10:18:29 +0000
net-p2p/datum_gateway: all bitcoind RPC calls fail with HTTP 400 against libevent 2.1.13
Fix 400 when talking to a Bitcoin Core node linked to libevent 2.1.13
PR: 298748
---
net-p2p/datum_gateway/Makefile | 2 +-
.../datum_gateway/files/patch-src_datum_jsonrpc.c | 22 ++++++++++++++++++++++
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/net-p2p/datum_gateway/Makefile b/net-p2p/datum_gateway/Makefile
index 0668efa690a5..e0ad4cf3034f 100644
--- a/net-p2p/datum_gateway/Makefile
+++ b/net-p2p/datum_gateway/Makefile
@@ -2,7 +2,7 @@ PORTNAME= datum_gateway
DISTVERSIONPREFIX= v
DISTVERSION= 0.4.0
DISTVERSIONSUFFIX= beta
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= net-p2p
MAINTAINER= kiwi@FreeBSD.org
diff --git a/net-p2p/datum_gateway/files/patch-src_datum_jsonrpc.c b/net-p2p/datum_gateway/files/patch-src_datum_jsonrpc.c
new file mode 100644
index 000000000000..cdbecffc0320
--- /dev/null
+++ b/net-p2p/datum_gateway/files/patch-src_datum_jsonrpc.c
@@ -0,0 +1,22 @@
+--- src/datum_jsonrpc.c.orig 2025-07-16 19:51:32 UTC
++++ src/datum_jsonrpc.c
+@@ -146,7 +146,6 @@
+ struct upload_buffer upload_data;
+ json_error_t err = { };
+ struct curl_slist *headers = NULL;
+- char len_hdr[64];
+ char curl_err_str[CURL_ERROR_SIZE];
+ bool check_for_result = true;
+
+@@ -172,10 +171,9 @@
+
+ upload_data.buf = rpc_req;
+ upload_data.len = strlen(rpc_req);
+- sprintf(len_hdr, "Content-Length: %lu",(unsigned long) upload_data.len);
++ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)upload_data.len);
+
+ headers = curl_slist_append(headers, "Content-type: application/json");
+- headers = curl_slist_append(headers, len_hdr);
+ headers = curl_slist_append(headers, "Expect:");
+
+ if (extra_header) {