I think that sgifford's WebDAV suggestion is right on. So, check out HTTP::DAV, Net::DAV::Server. I would also recommend a great little program called cadaver. It's a commandline WebDAV client that supports file upload, download, on-screen display, namespace operations, collection creation and deletion, and locking operations. Better yet, there's always neon---an HTTP and WebDAV client library with a C interface.
cadaver
WebDAV client library