mar10/wsgidav

!! Need some Help !!

sventek-s opened this issue · 1 comments

I am trying to implement a webdav server with python library on windows 10. Here is the script that I am using

import os
import logging

from cheroot import wsgi
from wsgidav.wsgidav_app import WsgiDAVApp

# current directory path
cur_dir = os.getcwd()

print(f"[+] Current directory path: {cur_dir}")

config ={
	"host": "0.0.0.0",
	"port": 8080,
	"provider_mapping": {
		"/": cur_dir,
	},
	"verbose": 5,
    # HTTP Authentication Options
    "http_authenticator": {
        "domain_controller": None,
        "accept_basic": False,
        "trusted_auth_header": None,
     },
}

app = WsgiDAVApp(config)

server_args = {
    "bind_addr": (config["host"], config["port"]),
    "wsgi_app": app,
}

# set logging for debugging
#logger = logging.getLogger("wsgidav")
#logger.propagate = True
#logger.setLevel(logging.DEBUG)

server = wsgi.Server(**server_args)
print("[+] Starting server.")
server.start()
print("[+] Started.")

Problems I am facing:

  • verbose config option is not logging debug info, so I am unable to see anything.
  • webhost is accessible from the browser but I am unable to login, its asking for username and password.

How can I fix those two issues, kindly assist. Most of the script I have created from the example/documentation you have provided is there anything I am doing wrong?

Also how does one quit after server.start() is called. When I do a CTRL + C I get the below error and I am forced to kill the whole command prompt window.

image

Now is there a way to kill the server like server.stop()

Weird thing the command line option works pretty well, but I want to use the library.

image

mar10 commented

Closing in favor of #285