Webdav and CURL a question for UNIX geeks

Discussion in 'Mac OS X 10.3 (Panther) Discussion' started by obelix, Mar 3, 2005.

  1. obelix macrumors member

    Oct 20, 2004
    Ah another of my streaming questions together. I've just setup a webdav server on apache2 on OS X and I have a question regarding webdav. Is it possible to use webdav in conjunction with CURL to upload a file? I know the command in curl is...

    curl -T file.png http://localhost/web-dav/file.png

    But I keep getting:
    The requested method PUT is not allowed for the URL

    If I could find a version of mod_put that could work with OS X that would be nice.. but so far no such luck... so webdav is my only option. Any ideas guys?
  2. Westside guy macrumors 601

    Westside guy

    Oct 15, 2003
    The soggy side of the Pacific NW
    DAV is a completely different protocol than PUT. You can find a lot more info on webdav.org.

    PUT has been directly supported by Apache for a number of years now - no module is required. It's just a matter of configuring httpd.conf correctly. But enabling it is a good way to get your system compromised if you're not careful.

    Edit: I was just thinking that this would be overkill anyway. You could accomplish the same thing with scp. You'd probably want to set up a specific user account for this and only this, and use a public/private key pair (w/o password) and restrict access to just the particular IP addresses involved. I'm sure that's possible with OS X, although off hand I'm not sure how to do it. :D Did something similar on Linux a few years ago. Maybe someone whose done this more recently, or has more time on their hands to figure it out ;) , will chime in.

Share This Page