Gowebdav client causes seafdav to max out cpu

I was writing a FTP to WebDav bridge because my scanner supports FTP uploads and not much else and I ran into an issue with gowebdav (which I freely admit might be borked as a client library) where the files get created on the server but then nothing happens, the files never finish arriving they just stay at 0 bytes and the sender stops. Like I said probably a bug in gowebdav, I’ll investigate.

Problem is, I check a little while later after I’ve given up on using webdav and switched to FTP to API bridge (which works so smoothly if a little fiddly, why is the api inconsistent, why doesn’t a dir/detail return all the attributes a dir does?) and my server is screaming it’s head off.

I check top and python is maxing out the cpu, I check ps aux and find out it’s seafdav.

No matter what the client does to seafdav it shouldn’t max out a cpu, that’s the basis of a DoS.

I can probably provide code to replicate, but it’s 1:30 am and it’s bed time.

Screenshot of top

And code to do it git . fremnet . net / freman / breakseadav (I can’t include links in my posts so remove the spaces)