Python web server - return the specified page data (3)

# import moduleimportsocket
import re

if __name__ == '__main__':
    # 1. Create tcp server Sockettcp_server_socket =socket.socket(socket.AF_INET , socket.SOCK_STREAM)
    # 9. Set port number reusetcp_server_socket.setsockopt(socket.SOL_SOCKET, socket.SOCK_REUSEADDR, True)
    # 2. Bind port numbertcp_server_socket.bind(("", 9090))
     # 3.Setting the listenertcp_server_socket.listen(128)
    while True:
        # 4. Waiting to receive the client's connection requesttcp_client_socket, ip_port = tcp_server_socket.accept()# 5. Get the HTTP sent by the client Request messagehttp_request_data = service_client_socket.recv(4096)
        # 6. Decode binary datahttp_request_content = http_request_data.decode("utf-8")
        print(http_request_content)
        # 7. Regular match client request message content|| |mach_obj = re.search(
        mach_obj = re.search("/\S*" , http_requst_content)
        if math_obj:
            # 7.1 Matching successfully, get the requested resource connectionrequest_path = match_obj.group()# 7.2 Determine if the requested path is the root path, if it is the root path Specify the corresponding file 
            if requst_path == "/":
                requst_path = "/index.html" 
            # 7.3 Open the file to read the data in the file 
            with open("static" + request_path, "rb") as file:
                # 7.4 Read all the data in the filefile_data =file.read()

            # 8.1 Response line reponse_line ="HTTP/1.1 200 OK\r\n"
            # 8.2 Response header prompt: response header information The programmer can also customize a response header information according to his needs 
                         # Note: Content-Type: text/html; charset=utf -8: The server tells the browser the type and encoding format of the browserresponse_header ="Server:PWS/1.1\\nother:ok\r\nContent-Type:text/html;charset=utf-8\r\n"
            # 8.3 Response bodyresponse_body = file_data# 8.4 Assembling the http response message dataresponse_data = ( Response_line + response_header +"\r\n").encode("utf-8") + response_body
            # 8. Send http response message data to the clientservice_client_socket.send(response_data)
        # Close the socketservice_client_socket.close()