Skip to content

Conversation

@MitchBradley
Copy link

  1. Adds the necessary methods for WebDAV, like PROPFIND, LOCK, MKCOL, PUT, etc
  2. Adds support for chunked encoding in requests, primarily used by MacOS via Finder and WebDAVFS
  3. Adds a WebDAV example for testing the above

@mathieucarbou
Copy link
Member

Linking the discussion: #369

@mathieucarbou
Copy link
Member

mathieucarbou commented Jan 25, 2026

@MitchBradley : Thanks a lot !
I think this is a great addition and use case.

FYI we are not using WiFiCongig.h in CI - please have a look at how the other examples are constructed. We are building with pio also.

The PR is quite big so it will take some time for it to be reviewed by at least 2 team members. Meanwhile you could have a look at these CI issues maybe ?

@MitchBradley
Copy link
Author

  1. How did I miss the platformio.ini at the top level? Duh.
  2. Okay, the wifi config is now like the other examples. Unfortunately for me, 192.168.4.1 collides with my main subnet, but that is my problem.
  3. I think I fixed the CI problems. Everything works on my local build, and the GitHub workflows are cranking along in my fork, so far without any fails. Making FS operations work between ESP and RPi is annoying, reminding me of why I use std:filesystem in my own code.
  4. The PR diffs appear worse than they really are. Things are isolated to contiguous chunks that the diff algorithm splits poorly. In particular, this bit
    } else if (_parseState == PARSE_REQ_BODY) {
      BLAH;
    }

became

    } else if (_parseState == PARSE_REQ_BODY) {
      if (_chunkedParseState != CHUNK_NONE) {
        A FEW LINES;
      } else {
        BLAH;
    }
  }

but diff chopped up the extra-indented BLAH into a mess, instead of realizing that is was just the same as before, but nested.

@mathieucarbou
Copy link
Member

Hello @MitchBradley,

We had some discussions and we think that this can be a good time to officially add support in the project, diectly in the sources, through implementing a handler, like this is done for WebSocket, SSE and JSON.

So to achieve that we are proposing to split this PR in 2 PRs:

  1. First PR would be the addition of the chunk encoding support for requests, which is included in the spec and also a requirement for WebDav. You can add an example showing how to use that but it does not need to be as complex as the webdav one: just a few lines of code.

  2. A second PR which would add WebDav support using a provided FS and by adding a handler, like it is done for JSON (could be LittleFS or others). Here, the idea would be to extract what you have in your example which would then become an officially supported part of asyncws. Maybe in that case you could add more improvement if you see fit. The idea would be to add support for webdav in the lib.

Since you have a pretty good use case in your app with webdav, this could be an opportunity to build a layer that is flexible enough that you could directly use or extend in your app.

Let us know what you think about this idea.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants