We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I noticed that the parameters "ssl" and "authtype" currently do not work.
The current code (which has the bug) can be found here: https://github.com/vscode-lcode/webdav/blob/main/lib/webdav.js#L180-L236
Please change the implementation of getClient in lib/webdav.js to the following code:
getClient
lib/webdav.js
getClient(uri) { const searchParams = new URLSearchParams(uri.query) // ssl let protocol = "http://" if (["", "true", "1"].indexOf(searchParams.get("ssl")) > -1) { protocol = "https://"; } // connection already established const key = protocol + uri.authority; if (this.clients[key]) { return this.clients[key]; } /**@type {webdav.WebDAVClientOptions} */ const opt = {}; // auth if ( uri.authority.indexOf("@") >= 0 && uri.authority.indexOf(":") >= 0 && uri.authority.indexOf(":") < uri.authority.indexOf("@") && searchParams.has("authtype") ) { const authtype = searchParams.get("authtype"); const [username, password] = (uri.authority.split("@")[0]).split(":") switch (authtype) { case "": case "b": case "basic": opt.authType = webdav.AuthType.Password; opt.username = username; opt.password = password; break; case "d": case "digest": opt.authType = webdav.AuthType.Digest; opt.username = username; opt.password = password; break; default: throw new Error( `Authentication type '${authtype}' is not supported!` ); } } let client = webdav.createClient(key, opt); this.clients[key] = client; return client; } }
This means that getOriginWithAuth can be removed as my implementation does not use it. https://github.com/vscode-lcode/webdav/blob/main/lib/webdav.js#L180-L236
getOriginWithAuth
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I noticed that the parameters "ssl" and "authtype" currently do not work.
The current code (which has the bug) can be found here: https://github.com/vscode-lcode/webdav/blob/main/lib/webdav.js#L180-L236
Please change the implementation of
getClient
inlib/webdav.js
to the following code:This means that
getOriginWithAuth
can be removed as my implementation does not use it.https://github.com/vscode-lcode/webdav/blob/main/lib/webdav.js#L180-L236
The text was updated successfully, but these errors were encountered: