aboutsummaryrefslogtreecommitdiff
path: root/network/elinks/gopher-html.patch
diff options
context:
space:
mode:
authorDavid Woodfall <dave@dawoodfall.net>2017-11-19 20:58:05 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-11-20 17:59:14 +0700
commitd8546d90adcc0ec9965d3e3b1e88e415f7f024bc (patch)
treeace2c0a6c7d4f3802a329cc8bb3eaf3cee45851b /network/elinks/gopher-html.patch
parent0e87b5e91725b09a8f0c0d8d5e0e86e4c78070a6 (diff)
network/elinks: Add options to disable mouse and gpm.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'network/elinks/gopher-html.patch')
-rw-r--r--network/elinks/gopher-html.patch18
1 files changed, 13 insertions, 5 deletions
diff --git a/network/elinks/gopher-html.patch b/network/elinks/gopher-html.patch
index 3537d47678..350f577721 100644
--- a/network/elinks/gopher-html.patch
+++ b/network/elinks/gopher-html.patch
@@ -1,16 +1,18 @@
diff -Naur a/src/protocol/gopher/gopher.c b/src/protocol/gopher/gopher.c
--- a/src/protocol/gopher/gopher.c 2013-12-18 15:38:57.000000000 +0000
-+++ b/src/protocol/gopher/gopher.c 2017-11-15 18:36:43.630034028 +0000
-@@ -277,6 +277,8 @@
++++ b/src/protocol/gopher/gopher.c 2017-11-15 23:10:19.758394411 +0000
+@@ -277,6 +277,10 @@
struct string command;
enum gopher_entity entity = DEFAULT_GOPHER_ENTITY;
unsigned char *selector = conn->uri->data;
-+ unsigned char *URI = "hURI";
-+ unsigned char *URL = "hURL";
++ unsigned char *URI = "hURI%3";
++ unsigned char *URL = "hURL%3";
++ unsigned char *CURI = "HURI%3";
++ unsigned char *CURL = "HURL%3";
int selectorlen = conn->uri->datalen;
struct gopher_entity_info *entity_info;
size_t size;
-@@ -288,6 +290,12 @@
+@@ -288,6 +292,18 @@
selectorlen--;
}
@@ -20,6 +22,12 @@ diff -Naur a/src/protocol/gopher/gopher.c b/src/protocol/gopher/gopher.c
+ selectorlen--;
+ }
+
++ if(strstr(selector, CURL) != NULL || strstr(selector, CURI) != NULL) {
++ entity = GOPHER_CHTML;
++ *selector++;
++ selectorlen--;
++ }
++
/* This is probably a hack. It serves as a work around when no entity is
* available in the Gopher URI. Instead of segfaulting later the content
* will be served as application/octet-stream. However, it could