http digest authentication, WebDAV, putting XML elements into http.request

Has anyone implemented http digest authentication in Codea?

There’s a pure Lua MD5 library here:

And some Lua digest code here:

…that uses the MD5 code and Luasocket (which we now have in Codea)

Has anyone implemented this? Does it seem possible?

Nobody’s tried it, AFAIK

It’s for connecting to a WebDAV server. What I’ve done is, so that I can check whether I can make the server do what I want it to before I dive into trying to get digest authentication working, I’ve made the webDAV available on the local network only, and switched off the username and password requirements. Plus it’s only online for a few minutes at a time.

The server seems to be working though. I was able to use the GET method to retrieve files, and also methods that aren’t listed in the Codea http.request documentation, such as PROPFIND to get a list of file names and other data:

http.request("http://localhost:8080/MyRepository/", success, fail, {headers ={Translate="f", SendChunks = "True", AllowWriteStreamBuffering = "True", depth = "1"}, method = "PROPFIND"})

Another question for the wise heads of Codea Talk. WebDAV supports including XML elements in the server request. For example, I would like to refine the above PROPFIND request to just return the file names. This is the XML element I would need to add to the request:

  <?xml version="1.0" encoding="utf-8" ?> 
  <propfind xmlns="DAV:"> 

Does anyone know where, in the Codea http.request command, I would add this XML element?

You might try @toffer

I think I misunderstood what http://localhost:8080 means. I thought it meant the local network, but I think its just on the device (this is for an iPad app with webDAV support. I’m using Codea to read and write files to this other app). If I’m right, do I even need authentication, or is it secure enough to use without a username and password?