代码实现:
index页面:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
hello,hi!------------------------------------
</body>
</html>
main页面:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
main page
</body>
</html>
服务器文件application.py:
import socket
import threading
from response import HttpResponse
from request import HttpRequest
# WSGI服务器
class WSGIServer():
def __init__(self, host='localhost', port=8080, connectSize=10