From 90709fd4873964f0322570e9d7c222892f99a77a Mon Sep 17 00:00:00 2001 From: Sads Date: Thu, 11 Jun 2026 23:50:19 +0200 Subject: [PATCH] Log hex dump of parsed server URL at startup Co-Authored-By: Claude Fable 5 --- src/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main.c b/src/main.c index 57f4ac3..eb3bb67 100644 --- a/src/main.c +++ b/src/main.c @@ -896,6 +896,16 @@ int main(void) "Account Settings > API Keys.", "Set your server and API key in " CONFIG_PATH); + /* log the exact bytes of the server URL; invisible characters in the + * config show up here when curl complains about the protocol */ + { + char hex[3 * 64 + 1] = ""; + int n = strlen(g_server); + for (int i = 0; i < n && i < 64; i++) + sprintf(hex + 3 * i, "%02x ", (unsigned char)g_server[i]); + log_line("server='%s' len=%d hex=%s", g_server, n, hex); + } + show_status("Loading library from %s ...", g_server); fetch_page(1); if (g_asset_count == 0)