2

I have created python http server using http.server.SimpleHTTPRequestHandler, below is the code for it

PORT = 8008
Handler = http.server.SimpleHTTPRequestHandler

with socketserver.TCPServer(("", PORT), Handler) as httpd:
print("serving at port", PORT)
httpd.serve_forever()

When I try to access this server files from chrome browser, sometimes it get's stuck in pending status for about 1 minute and then the page loads

enter image description here

After reading some articles found that, this issue is specific to chrome only and it is because we are serving http via tcp socket. Is there any solution for this, or any configuration on server side code to resolve this

kailashdesiti
  • 165
  • 1
  • 13

0 Answers0