commit 18abd06bbeb3591e9b0d2b04d656879d2a33e186 from: rsadowski date: Tue Mar 3 19:51:41 2026 UTC Set User-Agent for HTTP healthchecks Joel Carnat (Thanks) notice that GoToSocial does not like it when we sent no User-Agent and returns an HTTP/418. Lloyd pointed to use RELAYD_SERVERNAME instead hardcoded "relayd" OK sthen, claudio (diff without RELAYD_SERVERNAME) commit - 499b552cbb56e2d6bee51512f4a3f109f4616662 commit + 18abd06bbeb3591e9b0d2b04d656879d2a33e186 blob - e8bb541236f24e166b3d10d7f6acfd47b1acf810 blob + eaa7c2cbe1787c2069950b19999449c2adbe89e4 --- parse.y +++ parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.260 2026/03/02 19:28:01 rsadowski Exp $ */ +/* $OpenBSD: parse.y,v 1.261 2026/03/03 19:51:41 rsadowski Exp $ */ /* * Copyright (c) 2007 - 2014 Reyk Floeter @@ -922,8 +922,8 @@ tablecheck : ICMP { table->conf.check = CHECK_ICMP; YYERROR; } if (asprintf(&table->sendbuf, - "HEAD %s HTTP/1.%c\r\n%s\r\n", - $2, strlen($3) ? '1' : '0', $3) == -1) + "HEAD %s HTTP/1.%c\r\nUser-Agent: %s\r\n%s\r\n", + $2, strlen($3) ? '1' : '0', RELAYD_SERVERNAME, $3) == -1) fatal("asprintf"); free($2); free($3); @@ -937,8 +937,8 @@ tablecheck : ICMP { table->conf.check = CHECK_ICMP; } table->conf.check = CHECK_HTTP_DIGEST; if (asprintf(&table->sendbuf, - "GET %s HTTP/1.%c\r\n%s\r\n", - $2, strlen($3) ? '1' : '0', $3) == -1) + "GET %s HTTP/1.%c\r\nUser-Agent: %s\r\n%s\r\n", + $2, strlen($3) ? '1' : '0', RELAYD_SERVERNAME, $3) == -1) fatal("asprintf"); free($2); free($3);