使用 Python bottle 0.12.8 作为 Apache 服务器上 Windows 下的 CGI 应用程序的截断输出
Truncated output using Python bottle 0.12.8 as a CGI application under Windows on an Apache server
这是应用程序:
#!/home2/friendv0/Python-2.7.9/bin/python
from bottle import Bottle
app = Bottle()
@app.get('/')
def hello():
return """<!DOCTYPE html>
<html lang="en">
<head>
<title>bottle Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
</head>
<body>
Hello!
</body>
</html>
"""
app.run(server='cgi')
结果输出为:
<!DOCTYPE html>
<html lang="en">
<head>
<title>bottle Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
</head>
<body>
Hello!
</body>
请注意,缺少结束标记
这是应用程序:
#!/home2/friendv0/Python-2.7.9/bin/python
from bottle import Bottle
app = Bottle()
@app.get('/')
def hello():
return """<!DOCTYPE html>
<html lang="en">
<head>
<title>bottle Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
</head>
<body>
Hello!
</body>
</html>
"""
app.run(server='cgi')
结果输出为:
<!DOCTYPE html>
<html lang="en">
<head>
<title>bottle Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
</head>
<body>
Hello!
</body>
请注意,缺少结束标记