Makes DAV middleware more generic