-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
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
Not a valid DAV response #1
Comments
It's been a while since I last tried it, but in my tests things worked very well. There were some corner cases with moving files between folders, but plain read and write was not an issue. I used edpídf 4.x tho. You seem to have dug deep enough already to find the root cause :) If you do and the bug is in this library, please file a PR! |
You could also give the libsoup example a spin. It uses the exact same DAV implementation and was quite helpful during development on a desktop PC. |
Will do. If you get a moment and can check it on esp32 to confirm it is or not working that would be great. I'm not familiar with libsoup. I will try that too. I did find that I have to strip the trailing slash off of paths to get a directory listing from the sd card mounted into the vfs at "/sd". That was easy enough though. |
What might be relevant is that I only tested this with the Linux gvfs implementation. I didn't have a Mac around when I hacked on that. Could you try a Linux machine? |
I could try that but am most interested in getting it working on ESP32. I do have a Linux VM on my macbook though. |
No what I meant was: I had an esp32 as server, but used Linux as DAV client. |
Oh... ok. I did try cadaver but it does not like the chunked encoding. What client did you use on Linux? |
Oh.. I see gvfs? I will check and see if that is on my Linux server. I run Linux Mint on my home dev server. |
I did try mounting it with the file manager and it didn't like that either. I will try again. |
Well my theory about the bug with httpd_resp_send_chunk() was wrong. I wrote a small test program and it works just fine. It doesn't do anything except return a list of 20 fake files but it works without issue. I will update when I have more info. Here's the test program btw.
|
Finally revisiting this and discovered what was going on. In your example "webdav_handler()" was returning the http status code rather than ESP_OK. That was causing the connection to immediately close and the last few chunks didn't get sent. Fixing that resolves the issue I was describing here. I found some other issues as well but I will bundle them up in a PR to submit later. You can see it in action here. https://github.com/idolpx/meatloaf-specialty |
I'm trying to use this in a project with an SD card. I've added some debug code and can see that sendPropResponse() is sending the data in chunks. I get the error in the attached screenshot though. In wireshark it looks like the last chunk is never sent. Even though I'm seeing it being sent in the serial monitor while running. I also tried just sending one small chunk and calling closeChunk() and I don't see any of the data come across in wireshark. This leads me to believe that the buffer is not being flushed when httpd_resp_send_chunk() in esp-idf is being called.
I'm using esp-idf 5.1.0 btw. Can someone confirm that things work for them? Or that they are having the same issue?
I'd really like to get this working. Great job on the code. It is very well thought out and easy to follow.
The text was updated successfully, but these errors were encountered: