Coder Social home page Coder Social logo

webdav-cli's People

Contributors

dependabot[bot] avatar svtslv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

webdav-cli's Issues

Cruising whenever I try to access

My Os : Alpine v3.16
My command:

/r npx webdav-cli --host 10.240.4.151 --port 5236 --directory true --autoIndex true --path /root

Response:

·                   _           _                                  _   _ 
 __      __   ___  | |__     __| |   __ _  __   __           ___  | | (_)
 \ \ /\ / /  / _ \ | '_ \   / _` |  / _` | \ \ / /  _____   / __| | | | |
  \ V  V /  |  __/ | |_) | | (_| | | (_| |  \ V /  |_____| | (__  | | | |
   \_/\_/    \___| |_.__/   \__,_|  \__,_|   \_/            \___| |_| |_|
                                                                         
Homepage: https://github.com/svtslv/webdav-cli

Server running at http://10.240.4.151:5236
[rights]: all
[digest]: false
username: zhl8jupfs6l75du7
password: 76kgoerjd72ienb9
Hit CTRL-C to stop the server
Run with --help to print help

Everything was fine. Logged in to the WebDAV server successfully using Chrome browser & rclone.

But when I tried to log in the WebDAV server using Mix Explorer the application crushed.

Here is the log:

>> PROPFIND / > 401 Unauthorized
node:_http_outgoing:576
    throw new ERR_HTTP_HEADERS_SENT('set');
    ^

Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    at new NodeError (node:internal/errors:372:5)
    at ServerResponse.setHeader (node:_http_outgoing:576:11)
    at HTTPRequestContext.writeBody (/root/.npm/_npx/fc0ee8b65271df27/node_modules/webdav-server/lib/server/v2/RequestContext.js:278:31)
    at done (/root/.npm/_npx/fc0ee8b65271df27/node_modules/webdav-server/lib/server/v2/commands/Propfind.js:293:25)
    at /root/.npm/_npx/fc0ee8b65271df27/node_modules/webdav-server/lib/server/v2/commands/Propfind.js:358:33
    at Workflow.doneFn (/root/.npm/_npx/fc0ee8b65271df27/node_modules/webdav-server/lib/server/v2/commands/Propfind.js:350:37)
    at /root/.npm/_npx/fc0ee8b65271df27/node_modules/webdav-server/lib/helper/Workflow.js:47:57
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 'ERR_HTTP_HEADERS_SENT'
}

My Configuration Inside Mix Explorer:
configuration

Note:I can access other WebDAV server using Mix Explorer without any Issues. So, There is no problem with Mix Explorer WebDAV module

Garbled characters are encountered when the file name is non-ascii characters in browser.

Garbled characters are encountered when the file name is non-ascii characters.

List the files in the current folder.



$ls

baidupcs-batch-upload
http-https-spdy-http2-polyglot
http-test
image-conversion-compression-webp
importcjsamdumd
index.html.1
latest手机就是就是.json
long-image-split-square
node_modules
package-lock.json
package.json
platform-manager-server
rename-by-md5
yarn.lock

Start the webdav service.


npx webdav-cli --digest --ssl --username root --password root --host 0.0.0.0


https://localhost:1900/

Open it in the browser to get the following content.


..
.bash_history
.cache
.config
.gitconfig
.node-gyp
.node_repl_history
.npm
.npminstall_tarball
.npmrc
.pnpm-store
.python_history
.wget-hsts
.yarnrc
baidupcs-batch-upload
http-https-spdy-http2-polyglot
http-test
image-conversion-compression-webp
importcjsamdumd
index.html.1
latest鎵嬫満灏辨槸灏辨槸.json
long-image-split-square
node_modules
package-lock.json
package.json
platform-manager-server
rename-by-md5
yarn.lock

ctx.response.setHeader('Content-Type', 'text/html');

ctx.response.end(html);

Just make the following changes to the source file to solve the problem.

ctx.response.setHeader('Content-Type', 'text/html;charset=UTF-8');

        
ctx.response.end(`<html><head></head><body>`+html+`</body></html>`);

Add a LICENSE file for clarity

This project has a license declared in the README, but not a LICENSE file containing the license terms. I suggest adding it for very clear visibility.

Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client

npx webdav-cli --username root --password root --host localhost --path d:/ --port 1905
                    _           _                                  _   _
 __      __   ___  | |__     __| |   __ _  __   __           ___  | | (_)
 \ \ /\ / /  / _ \ | '_ \   / _` |  / _` | \ \ / /  _____   / __| | | | |
  \ V  V /  |  __/ | |_) | | (_| | | (_| |  \ V /  |_____| | (__  | | | |
   \_/\_/    \___| |_.__/   \__,_|  \__,_|   \_/            \___| |_| |_|

Homepage: https://github.com/svtslv/webdav-cli

Server running at http://localhost:1905
[rights]: all
[digest]: false
username: root
password: root
Hit CTRL-C to stop the server
Run with --help to print help
_http_outgoing.js:543
    throw new ERR_HTTP_HEADERS_SENT('set');
    ^

Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    at ServerResponse.setHeader (_http_outgoing.js:543:11)
    at HTTPRequestContext.writeBody (C:\Users\ma\AppData\Local\Yarn\Data\global\node_modules\webdav-server\lib\server\v2\RequestContext.js:278:31)
    at done (C:\Users\ma\AppData\Local\Yarn\Data\global\node_modules\webdav-server\lib\server\v2\commands\Propfind.js:293:25)
    at C:\Users\ma\AppData\Local\Yarn\Data\global\node_modules\webdav-server\lib\server\v2\commands\Propfind.js:358:33
    at Workflow.err [as errorFn] (C:\Users\ma\AppData\Local\Yarn\Data\global\node_modules\webdav-server\lib\server\v2\commands\Propfind.js:320:33)
    at C:\Users\ma\AppData\Local\Yarn\Data\global\node_modules\webdav-server\lib\helper\Workflow.js:35:61
    at processTicksAndRejections (internal/process/task_queues.js:75:11) {
  code: 'ERR_HTTP_HEADERS_SENT'
}

CORS support

l use the server in one website, but l got CORS error, can you support the CORS.
You can reference to this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.