diff options
author | Nguyễn Gia Phong <cnx@loang.net> | 2025-05-27 16:19:39 +0900 |
---|---|---|
committer | Nguyễn Gia Phong <cnx@loang.net> | 2025-05-27 16:19:39 +0900 |
commit | 6b1a96e7726aadfe00704134b60888048a96c212 (patch) | |
tree | 748e452d1fb0b8c1ce5c26307f27acc3cb668dc9 | |
parent | 13ae3c598a64086bb548e953878785c84b27cd5a (diff) | |
download | scadere-6b1a96e7726aadfe00704134b60888048a96c212.tar.gz |
Fix content type of web pages
-rw-r--r-- | src/scadere/listen.py | 4 | ||||
-rw-r--r-- | 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, </div> </content> <id>{url}</id> - <link rel="alternate" type="text/plain" href="{url}"></link> + <link rel="alternate" type="application/xhtml+xml" href="{url}"></link> <title>TLS cert for {hostname} will expire at {not_after}</title> <updated>{not_before.isoformat()}</updated> </entry>''' |