From 3d23424b9ff1b96318e6a967e9bb66dd79145c53 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 12 May 2019 22:56:54 +0200 Subject: [PATCH] [gopher] Another try for #33. This time replace /URL -> URL for h type. --- src/protocol/gopher/gopher.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/protocol/gopher/gopher.c b/src/protocol/gopher/gopher.c index da76d37f..1d2ce627 100644 --- a/src/protocol/gopher/gopher.c +++ b/src/protocol/gopher/gopher.c @@ -302,6 +302,12 @@ init_gopher_connection_info(struct connection *conn) selectorlen++; } + if (entity_info->type == GOPHER_HTML && selectorlen > 3 + && strncmp(selector, "/URL", 4) == 0) { + selector++; + selectorlen--; + } + state = add_gopher_command(conn, &command, entity, selector, selectorlen); if (!is_in_state(state, S_CONN)) return state;