[drupal-devel] Describing the WebDAV module

Allie Micka allie at pajunas.com
Tue Jul 12 00:45:47 UTC 2005


I would love to see WebDAV and/or FTP support make it into Drupal.  
Done properly, WebDAV support can eliminate write access to the 
filesystem.  This could be used to enhance security and eliminate 
safe_mode issues in certain shared hosting environments.

It could also be part of a scalability solution, where uploads/file 
write operations are sent to a master host and then rsync'ed out to 
cluster hosts.  Additionally/alternatively, cluster members could 
populate missing files by retrieving them from the DAV-enabled master.

In order to take advantage of these processes, the DAV module must play 
well with something like the filesystem module, not as its own 
stand-alone thing.  Based on how I would imagine using DAV, it seems 
that the administrator should set DAV/FTP/filesystem settings and leave 
the user upload experience unchanged.  Perhaps I am misunderstanding 
Fabiano's description, but it's not clear whether it would work this 
way.

Fabiano, perhaps you can take a step back from the code/implementation 
and describe the functional benefits of adding WebDAV to drupal.  What 
features and capabilities will it give us?  How will users interact 
with it?

Thanks!

Allie

On Jul 8, 2005, at 8:33 AM, Fabiano Sant'Ana wrote:

> What is my Idea?
> We will have a global array ($_webdav) created by webdav hook_menu, 
> each dav
> module(for example, DAV_upload.module) will create a item in 
> $_webdav['hooks']
> with informations about how to call the hook, what is the base 
> collection name,
> etc.
> In hook_menu webdav.module will parse the User Request and put it on 
> $_webdav,
> then it will call the hook_dav function to handle the response.
>
> Here an example...
>
> In webdav.module...
>   function webdav_menu($may_cache) {
>     global $_webdav;
>     if(!isset($_webdav))
>       $_webdav = array();
>
>     $items = array();
>     $items[] = array('path'     => 'webdav',
>                      'title'    => t('WebDAV Interface'),
>                      'callback' => 'webdav_interface',
>                      'access'   => user_access('access nodes')); 
> //administer
> nodes
>
>     return $items;
>   }
>
> In webdav.upload.module (I think that I need a better name)... ;)
>   function dav_upload_menu($may_cache) {
>     global $_webdav;
>
>     $_webdav['hooks'][] = array('collection' => 'upload',
>                                 'handler'    => 'dav_upload_handler');
>   }
Allie Micka
pajunas interactive, inc.
http://www.pajunas.com/

scalable web hosting and open source solutions




More information about the drupal-devel mailing list