summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index a89eb0eb..3f655db5 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -1863,7 +1863,12 @@ static void checkResponse_DocumentWidget_(iDocumentWidget *d) {
1863 updateTrust_DocumentWidget_(d, resp); 1863 updateTrust_DocumentWidget_(d, resp);
1864 init_Anim(&d->sideOpacity, 0); 1864 init_Anim(&d->sideOpacity, 0);
1865 init_Anim(&d->altTextOpacity, 0); 1865 init_Anim(&d->altTextOpacity, 0);
1866 format_String(&d->sourceHeader, "%d %s", statusCode, get_GmError(statusCode)->title); 1866 format_String(&d->sourceHeader,
1867 "%d %s",
1868 statusCode,
1869 isEmpty_String(&resp->meta) && !isSuccess_GmStatusCode(statusCode)
1870 ? get_GmError(statusCode)->title
1871 : cstr_String(&resp->meta));
1867 d->sourceStatus = statusCode; 1872 d->sourceStatus = statusCode;
1868 switch (category_GmStatusCode(statusCode)) { 1873 switch (category_GmStatusCode(statusCode)) {
1869 case categoryInput_GmStatusCode: { 1874 case categoryInput_GmStatusCode: {
@@ -2773,14 +2778,12 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)
2773 id_GmRequest(d->request) == argU32Label_Command(cmd, "reqid")) { 2778 id_GmRequest(d->request) == argU32Label_Command(cmd, "reqid")) {
2774 set_Block(&d->sourceContent, body_GmRequest(d->request)); 2779 set_Block(&d->sourceContent, body_GmRequest(d->request));
2775 if (!isSuccess_GmStatusCode(status_GmRequest(d->request))) { 2780 if (!isSuccess_GmStatusCode(status_GmRequest(d->request))) {
2781 /* TODO: Why is this here? Can it be removed? */
2776 format_String(&d->sourceHeader, 2782 format_String(&d->sourceHeader,
2777 "%d %s", 2783 "%d %s",
2778 status_GmRequest(d->request), 2784 status_GmRequest(d->request),
2779 cstr_String(meta_GmRequest(d->request))); 2785 cstr_String(meta_GmRequest(d->request)));
2780 } 2786 }
2781 else {
2782 clear_String(&d->sourceHeader);
2783 }
2784 updateFetchProgress_DocumentWidget_(d); 2787 updateFetchProgress_DocumentWidget_(d);
2785 checkResponse_DocumentWidget_(d); 2788 checkResponse_DocumentWidget_(d);
2786 if (category_GmStatusCode(status_GmRequest(d->request)) == categorySuccess_GmStatusCode) { 2789 if (category_GmStatusCode(status_GmRequest(d->request)) == categorySuccess_GmStatusCode) {