about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNguyễn Gia Phong <cnx@loang.net>2025-05-27 16:19:39 +0900
committerNguyễn Gia Phong <cnx@loang.net>2025-05-27 16:19:39 +0900
commit6b1a96e7726aadfe00704134b60888048a96c212 (patch)
tree748e452d1fb0b8c1ce5c26307f27acc3cb668dc9
parent13ae3c598a64086bb548e953878785c84b27cd5a (diff)
downloadscadere-6b1a96e7726aadfe00704134b60888048a96c212.tar.gz
Fix content type of web pages
-rw-r--r--src/scadere/listen.py4
-rw-r--r--tst/test_listen.py2
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>'''