summaryrefslogtreecommitdiffstats
path: root/network/elinks/patches/0003-gopher_directory_links.patch
diff options
context:
space:
mode:
Diffstat (limited to 'network/elinks/patches/0003-gopher_directory_links.patch')
-rw-r--r--network/elinks/patches/0003-gopher_directory_links.patch39
1 files changed, 0 insertions, 39 deletions
diff --git a/network/elinks/patches/0003-gopher_directory_links.patch b/network/elinks/patches/0003-gopher_directory_links.patch
deleted file mode 100644
index 8c61f281bb..0000000000
--- a/network/elinks/patches/0003-gopher_directory_links.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-#######################################################################
-# elinks does not follow links to directories on other servers
-# properly. This adds a '/' before the '1' at the start of a link and
-# removes any trailing 1.
-# dave@slackbuilds.org
-#######################################################################
-diff -Naur a/src/protocol/gopher/gopher.c b/src/protocol/gopher/gopher.c
---- a/src/protocol/gopher/gopher.c 2020-01-08 04:56:18.809169382 +0000
-+++ b/src/protocol/gopher/gopher.c 2020-01-08 04:52:43.722879240 +0000
-@@ -313,6 +313,9 @@
- unsigned char const* URL = "hURL%3";
- unsigned char const* CURI = "HURI%3";
- unsigned char const* CURL = "HURL%3";
-+ unsigned char *DIR = "1";
-+ unsigned char *SLASHDIR = "/1";
-+ unsigned char *SLASHPOS;
- int selectorlen = conn->uri->datalen;
- struct gopher_entity_info *entity_info;
- size_t size;
-@@ -350,6 +353,19 @@
- selectorlen++;
- }
-
-+ if (entity_info->type == '1') {
-+ if (strstr(selector, DIR) == selector) {
-+ *selector++;
-+ selectorlen--;
-+ }
-+ else {
-+ SLASHPOS = strstr(selector, SLASHDIR);
-+ if (SLASHPOS != NULL && strlen(SLASHPOS) == 2) {
-+ selectorlen--;
-+ }
-+ }
-+ }
-+
- state = add_gopher_command(conn, &command, entity, selector, selectorlen);
- if (!is_in_state(state, S_CONN))
- return state;