为什么 HTML 页面被浏览器下载为文件,而不是浏览?

Why HTML page downloaded as file by browser, not browsing instead?

我将下一个 HTML 代码用作页面,但 Chrome 只是将此页面作为文件下载,而不是作为超文本浏览。

使用的地址:http://127.0.0.1:5151/

怎么了?

<!DOCTYPE html>
<html lang="en" xmlns="">
<head>
    <meta charset="UTF-8">
    <title>Greeting</title>
</head>
<body>
    <h3>Greetings!</h3>
    Welcome to the Web Interface.<br/>
    <br/>
    What action are you want to do?<br/>
    <br/>

    1. <a href="/upload_config">Upload config</a><br/>

</body>
</html>

Headers 使用 Content-Type: application/xhtml

检查文件扩展名是否为 .html 而不是 .hmlt 或其他