From 6b1a96e7726aadfe00704134b60888048a96c212 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Tue, 27 May 2025 16:19:39 +0900 Subject: Fix content type of web pages --- src/scadere/listen.py | 4 +++- tst/test_listen.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/scadere/listen.py b/src/scadere/listen.py index c9801a5..fed8e5b 100644 --- a/src/scadere/listen.py +++ b/src/scadere/listen.py @@ -54,7 +54,9 @@ def entry(base_url, cert): ('content', {'type': 'xhtml'}, ('div', {'xmlns': 'http://www.w3.org/1999/xhtml'}, *body(*cert))), ('id', url), - ('link', {'rel': 'alternate', 'type': 'text/plain', 'href': url}), + ('link', {'rel': 'alternate', + 'type': 'application/xhtml+xml', + 'href': url}), ('title', (f'TLS cert for {hostname} will expire at {not_after}')), ('updated', not_before)) diff --git a/tst/test_listen.py b/tst/test_listen.py index 7121ad1..dc2011b 100644 --- a/tst/test_listen.py +++ b/tst/test_listen.py @@ -104,7 +104,7 @@ def test_atom_entry(base_url, hostname, port, {url} - + TLS cert for {hostname} will expire at {not_after} {not_before.isoformat()} ''' -- cgit 1.4.1