[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dav-dev
Subject:    [dav-dev] preventing duplicate resources
From:       Dave Viner <dviner () apache ! org>
Date:       2005-07-15 20:36:29
Message-ID: 42D81E4D.3070401 () apache ! org
[Download RAW message or body]

is there a way to prevent duplicate resources from being added in mod_dav? 

Conceptually, here's how i thought it might work:

whenever a user call PUT, the server would calculate an MD5 of the new 
contents.  The server would compare this MD5 against a list of all 
resources' MD5s (perhaps a simple DB table).  If the MD5 exists, the 
server would return an error (not sure exactly what the status would 
be).  If the MD5 did not exist, the server would perform the normal action.

Obviously, a "copy" operation would fail as well...

Is this sort of thing better implemented inside the Provider for 
mod_dav? or should i implement a completely separate apache module which 
handles these checks before the request gets to mod_dav at all?

thanks
dave

_______________________________________________
dav-dev maillist  -  dav-dev@lyra.org
http://dav.lyra.org/mailman/listinfo/dav-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic