aboutsummaryrefslogtreecommitdiffstats
path: root/url.c
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2020-11-07 22:12:35 +0000
committerbptato <nincsnevem662@gmail.com>2020-11-07 22:12:35 +0000
commit171db89cc2a82bad906704debb0db8a9058c3e35 (patch)
treea3a9d0b295b63f283d223e0f2c8598495c28b9f8 /url.c
parentUpdate ChangeLog (diff)
downloadw3m-171db89cc2a82bad906704debb0db8a9058c3e35.tar.gz
w3m-171db89cc2a82bad906704debb0db8a9058c3e35.zip
Support Gopher items search (7) and binary file (9)
Diffstat (limited to '')
-rw-r--r--url.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/url.c b/url.c
index ce0a53c..7368e94 100644
--- a/url.c
+++ b/url.c
@@ -1839,6 +1839,7 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
#ifdef USE_GOPHER
case SCM_GOPHER:
p = pu->file;
+ q = p;
n = 0;
while(*p == '/') {
++p;
@@ -1853,6 +1854,8 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
case 's':
case 'g':
case 'h':
+ case '7':
+ case '9':
tmp = Strnew_charp(pu->file);
gophertmp = Strdup(tmp);
Strdelete(tmp, n, 1);
@@ -1865,6 +1868,17 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
} else {
type = '\0';
}
+ while(*p != '\0') {
+ if(*p == '?')
+ *p = '\t';
+ ++p;
+ }
+ if(pu->query != NULL) {
+ tmp = Strnew_charp(pu->file);
+ Strcat_char(tmp, '\t');
+ Strcat_charp(tmp, pu->query);
+ pu->file = tmp->ptr;
+ }
if (non_null(GOPHER_proxy) &&
!Do_not_use_proxy &&
pu->host != NULL && !check_no_proxy(pu->host)) {