freelamb / simple_http_server

simple http server for upload and download
MIT License
164 stars 98 forks source link

upload succeeded, but an exception occurred #19

Open heqiyu34 opened 4 months ago

heqiyu34 commented 4 months ago

server_version: simple_http_server/0.3.2, python_version: Python/3.11.1 sys encoding: utf-8 Serving http on: 0.0.0.0, port: 8000 ... (http://0.0.0.0:8000/) 192.168.31.64 - - [09/Jun/2024 23:20:03] "GET / HTTP/1.1" 200 - 192.168.31.64 - - [09/Jun/2024 23:20:03] code 404, message File not found 192.168.31.64 - - [09/Jun/2024 23:20:03] "GET /favicon.ico HTTP/1.1" 404 -

Exception occurred during processing of request from ('192.168.31.64', 54148) Traceback (most recent call last): File "D:\Python311\Lib\socketserver.py", line 317, in _handle_request_noblock self.process_request(request, client_address) File "D:\Python311\Lib\socketserver.py", line 348, in process_request self.finish_request(request, client_address) File "D:\Python311\Lib\socketserver.py", line 361, in finish_request self.RequestHandlerClass(request, client_address, self) File "D:\Python311\Lib\socketserver.py", line 755, in init self.handle() File "D:\Python311\Lib\http\server.py", line 432, in handle self.handle_one_request() File "D:\Python311\Lib\http\server.py", line 400, in handle_one_request self.raw_requestline = self.rfile.readline(65537) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Python311\Lib\socket.py", line 706, in readinto return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host.

True File 'C:\Users\QY\Documents\simple_http_server\Screenshot_20240604_202716.jpg' upload success! by: ('192.168.31.64', 54166)

I have confirmed that the file has been uploaded, but got error "can't connect to this network" after clicking "back". BTW my phone chrome browser was used to access the server.

freelamb commented 4 months ago

Network error, retry?

heqiyu34 commented 4 months ago

I switched the network and got "back" successfully. However, I would still see the 10054 error, although it had no effect on uploading/downloading.

freelamb commented 4 months ago

batch download or upload?