diff options
Diffstat (limited to 'network/elinks/gopher-html.patch')
-rw-r--r-- | network/elinks/gopher-html.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/network/elinks/gopher-html.patch b/network/elinks/gopher-html.patch new file mode 100644 index 0000000000000..3537d47678223 --- /dev/null +++ b/network/elinks/gopher-html.patch @@ -0,0 +1,25 @@ +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 @@ + struct string command; + enum gopher_entity entity = DEFAULT_GOPHER_ENTITY; + unsigned char *selector = conn->uri->data; ++ unsigned char *URI = "hURI"; ++ unsigned char *URL = "hURL"; + int selectorlen = conn->uri->datalen; + struct gopher_entity_info *entity_info; + size_t size; +@@ -288,6 +290,12 @@ + selectorlen--; + } + ++ if(strstr(selector, URL) != NULL || strstr(selector, URI) != NULL) { ++ entity = GOPHER_HTML; ++ *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 |