diff options
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 8885bb9b..ed6c2518 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -788,7 +788,7 @@ static void checkResponse_DocumentWidget_(iDocumentWidget *d) { | |||
788 | showErrorPage_DocumentWidget_(d, invalidRedirect_GmStatusCode); | 788 | showErrorPage_DocumentWidget_(d, invalidRedirect_GmStatusCode); |
789 | } | 789 | } |
790 | else { | 790 | else { |
791 | /* TODO: only accept redirects that use gemini protocol */ | 791 | /* TODO: only accept redirects that use gemini scheme */ |
792 | postCommandf_App( | 792 | postCommandf_App( |
793 | "open redirect:1 url:%s", | 793 | "open redirect:1 url:%s", |
794 | cstr_String(absoluteUrl_String(d->mod.url, meta_GmRequest(d->request)))); | 794 | cstr_String(absoluteUrl_String(d->mod.url, meta_GmRequest(d->request)))); |
@@ -1079,8 +1079,7 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) | |||
1079 | d->scrollY = d->initNormScrollY * size_GmDocument(d->doc).y; | 1079 | d->scrollY = d->initNormScrollY * size_GmDocument(d->doc).y; |
1080 | d->state = ready_RequestState; | 1080 | d->state = ready_RequestState; |
1081 | /* The response may be cached. */ { | 1081 | /* The response may be cached. */ { |
1082 | const iRangecc proto = urlProtocol_String(d->mod.url); | 1082 | if (!equal_Rangecc(urlScheme_String(d->mod.url), "about")) { |
1083 | if (!equal_Rangecc(proto, "about")) { | ||
1084 | setCachedResponse_History(d->mod.history, response_GmRequest(d->request)); | 1083 | setCachedResponse_History(d->mod.history, response_GmRequest(d->request)); |
1085 | } | 1084 | } |
1086 | } | 1085 | } |
@@ -1604,9 +1603,9 @@ static void drawRun_DrawContext_(void *context, const iGmRun *run) { | |||
1604 | &str, | 1603 | &str, |
1605 | " \u2014%s%s%s\r%c%s", | 1604 | " \u2014%s%s%s\r%c%s", |
1606 | showHost ? " " : "", | 1605 | showHost ? " " : "", |
1607 | showHost ? (!equalCase_Rangecc(parts.protocol, "gemini") | 1606 | showHost ? (!equalCase_Rangecc(parts.scheme, "gemini") |
1608 | ? format_CStr("%s://%s", | 1607 | ? format_CStr("%s://%s", |
1609 | cstr_Rangecc(parts.protocol), | 1608 | cstr_Rangecc(parts.scheme), |
1610 | cstr_Rangecc(parts.host)) | 1609 | cstr_Rangecc(parts.host)) |
1611 | : cstr_Rangecc(parts.host)) | 1610 | : cstr_Rangecc(parts.host)) |
1612 | : "", | 1611 | : "", |