ref: 2306dc88df5182cb8cbe84a7f5bc02f87c1ce16e
parent: c243d993aa70cd1582e87b1c4953817ad448cf41
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Jun 30 06:45:32 EDT 2025
mothra: show errorbody contents (404 pages)
--- a/sys/src/cmd/mothra/url.c
+++ b/sys/src/cmd/mothra/url.c
@@ -205,6 +205,10 @@
n = strlen(buf);
snprint(buf+n, sizeof(buf)-n, "/body");
body = open(buf, OREAD);
+ if(body < 0){
+ snprint(buf+n, sizeof(buf)-n, "/errorbody");
+ body = open(buf, OREAD);
+ }
close(fd);
fd = body;
if(fd < 0)
--
⑨