I like the idea of just being able to specify a page to use for HTTP
error codes. If nobody beats me to it, I plan on taking a crack at
implementing that feature, for my own use if nothing else.
In the mean time, I've done something similar to this patch, but I
used monospace as the font. I also removed the "style" variable, used
for the CSS snippet, since I don't think it adds anything to a
bare-bones "404" page.
The nginx syntax seems reasonable, and putting a similar directive
in the httpd.conf file would work fine in my opinion.
Example:
error_page 404 /404.html
The hard-coded version could remain as the default.
On Fri, Feb 19, 2016, at 16:29, Stuart Henderson wrote:
> On 2016/02/19 21:51, Peter Krantz wrote:
> >
> > > 19 feb. 2016 kl. 17:49 skrev Luis Coronado <[email protected]>:
> > >
> > > I believe this was intentional from the beginning:
> > > http://www.openbsd.org/papers/bsdcan14-libressl/mgp00025.html
> >
> > Yeah, I figured. Nobody uses Comic Sans unintentionally :-)
> >
> > Smart quotes and hurry killed the previous patch. This one works better as
> > ammunition in dialogue with sysadmins.
>
> Probably too late for 5.9 but wouldn't it be better to use a separate
> file for this like bgplg does? Then people can paint their own bikeshed
> without recompiling or imposing their aesthetics on others.
>
> >
> > ? no_comic_sans_in_404.patch
> > Index: server_http.c
> > ===================================================================
> > RCS file: /cvs/src/usr.sbin/httpd/server_http.c,v
> > retrieving revision 1.105
> > diff -u -r1.105 server_http.c
> > --- server_http.c 11 Feb 2016 19:30:04 -0000 1.105
> > +++ server_http.c 19 Feb 2016 20:32:37 -0000
> > @@ -808,7 +808,7 @@
> >
> > /* A CSS stylesheet allows minimal customization by the user */
> > style = "body { background-color: white; color: black; font-family: "
> > - "'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', sans-serif; }\n"
> > + "sans-serif; }\n"
> > "hr { border: 0; border-bottom: 1px dashed; }\n";
> >
> > /* Generate simple HTML error document */
> >
> >
>
> I don't like the default much either, but I don't think replacing one
> personal hard(ish)coded preference with another is the answer.
>