summaryrefslogtreecommitdiff
path: root/net/echoping/files/patch-http.c
diff options
context:
space:
mode:
authorEugene Grosbein <eugen@FreeBSD.org>2025-05-05 02:36:07 +0700
committerEugene Grosbein <eugen@FreeBSD.org>2025-05-05 02:36:07 +0700
commit3b869d8f7198754c5e9bf59091ca8324612afcb9 (patch)
treefd7a905d2440e4ac02d46f7445447b28de8082cd /net/echoping/files/patch-http.c
parentmath/octave-forge: Change options. (diff)
net/echoping: readd the port
echoping is non-default optional but very useful dependency of the SmokePing (net-mgmt/smokeping). I use the software and will maintain the port. While here, make it possible to build echoping with GNU dns/libidn2 instead of dns/libidn. For now, still use libidn to preserve POLA. Default build not changed comparing with one before removal, so PORTREVISION not bumped.
Diffstat (limited to 'net/echoping/files/patch-http.c')
-rw-r--r--net/echoping/files/patch-http.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/net/echoping/files/patch-http.c b/net/echoping/files/patch-http.c
new file mode 100644
index 000000000000..d3cb1d14c52f
--- /dev/null
+++ b/net/echoping/files/patch-http.c
@@ -0,0 +1,20 @@
+--- http.c.orig 2019-12-29 10:14:41 UTC
++++ http.c
+@@ -6,7 +6,7 @@
+ #include "HTParse.h"
+
+
+-char big_recvline[MAXTOREAD];
++static char big_recvline[MAXTOREAD];
+
+ char *
+ make_http_sendline(char *url, char *host, int port, int nocache)
+@@ -113,6 +113,8 @@ read_from_server(CHANNEL fs, short ssl, boolean accept
+ /* 204 No Content is not an error, message body is empty by definition, see RFC 2616 */
+ if (reply_code == 204)
+ return 0; /* zero bytes is correct */
++ if (accept_redirects && reply_code >= 300 && reply_code < 400)
++ return 0;
+
+ if (! (reply_code >= 200 && reply_code < 300) &&
+ ! ((reply_code >= 300 && reply_code < 400) && accept_redirects))