Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

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

edited August 2015 in Questions Posts: 2,020

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?


  • IgnatzIgnatz Mod
    Posts: 5,396

    Nobody's tried it, AFAIK

  • Posts: 2,020

    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?

  • IgnatzIgnatz Mod
    Posts: 5,396

    You might try @toffer

  • edited August 2015 Posts: 2,020

    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?

Sign In or Register to comment.