wolf71 / TinyWebDav

A Single File,Tiny, Python WebDav Server .
143 stars 41 forks source link

KeyError: 'getcontentlength' #6

Open sarnobat opened 6 years ago

sarnobat commented 6 years ago

command

python webdav.py

Then I go to http://localhost:8000

output

----------------------------------------
Exception happened during processing of request from ('73.93.152.205', 55157)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread
    self.finish_request(request, client_address)
  File "webdav.py", line 754, in finish_request
    HTTPServer.finish_request(self, request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "webdav.py", line 612, in do_GET
    fullen = props['getcontentlength']
KeyError: 'getcontentlength'
----------------------------------------
rahaaatul commented 2 months ago

@wolf71 can you look at this error, please? I'm getting this error too on termux on android. I connected to it via Kodi and get this error continuously every time I try to access the server.

Relevant Information:

Click to see the error

```python Exception occurred during processing of request from ('***.***.*.***', 63277) Traceback (most recent call last): File "/data/data/com.termux/files/usr/lib/python3.11/socketserver.py", line 691, in process_request_thread self.finish_request(request, client_address) File "/data/data/com.termux/files/home/webdav3.py", line 819, in finish_request HTTPServer.finish_request(self, request, client_address) File "/data/data/com.termux/files/usr/lib/python3.11/socketserver.py", line 361, in finish_request self.RequestHandlerClass(request, client_address, self) File "/data/data/com.termux/files/usr/lib/python3.11/socketserver.py", line 755, in __init__ self.handle() File "/data/data/com.termux/files/usr/lib/python3.11/http/server.py", line 436, in handle self.handle_one_request() File "/data/data/com.termux/files/home/webdav3.py", line 435, in handle_one_request super().handle_one_request() File "/data/data/com.termux/files/usr/lib/python3.11/http/server.py", line 424, in handle_one_request method() File "/data/data/com.termux/files/home/webdav3.py", line 680, in do_GET fullen = props['getcontentlength'] ~~~~~^^^^^^^^^^^^^^^^^^^^ KeyError: 'getcontentlength' ```