Next up is the dav providers patch. Currently there is no way for dav modules to get access to the filename or the the request_rec. A dav module would need to check the filename to see if needs to enable acls or other options. A dav module would also need the request_rec for checking options via the r->per_dir_config (like mod_dav_acl needs to know what the principle path and location are set to). This can be done one of two ways.

This patch adds two hooks functions to the dav_hooks_repository struct, get_request_rec and get_pathname:

  http://www.brianfrance.com/software/apache/dav/dav-provider-1.diff

it also patches mod_dav_fs to support these two functions. The other option would be to only add the get_request_rec to the struct like this:

  http://www.brianfrance.com/software/apache/dav/dav-provider-2.diff

and have a module just use r->filename to get the filename instead of adding another function.

I believe this is the first patch that will break binary compatibility because it adds a function pointer to the middle of the struct. I believe binary compatibility could be retained if we add the function pointers to the end of the struct instead of in the middle. Moving the function could be part of the back porting patch to 2.2, but leave it as is in 2.3+.

Both of these patches also fix an issue where the definition of dav_hooks_repository_fs in modules/dav/fs/repos.c doesn't have a NULL value for the ctx (broken in HEAD and 2.2.x) at the end of the struct.

The patches are based on Jari's httpd-2.2.8-ju.patch patch.

Comments, questions, problems?

Brian

Reply via email to