[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#3636) more flexible file: URLs in LDIFs



Full_Name: Peter Marschall
Version: 2.2, 2.3, HEAD
OS: Linux
URL: ftp://ftp.openldap.org/incoming/peter-marschall-050406.patch
Submission from: (NULL) (84.56.99.111)


Hi,

without the libfetch library OpenLDAP's ability to interpret file: URLs is
quite
limited. E.g. it does only allow file: URLs with absolute paths.

True to the old sendmail motto "be liberal what you accept, be strict in what
you send", the attached patch adds a bit more flexibility to the parsing of
file: URLs in LDIFs.

It allows the following 4 forms of URLs:
- file:/absolute/path/to.ldif      (absolute path without a host)
- file:relative/path/to.ldif       (relative path without a host)
- file:to.ldif                     (without host and path)
- file://to.ldif                   (without host and path)
While none of these may comply 100% to the standard, they are accepted in other
programs (e.g. KDE, perl-ldap, ...).

The patch was made against 2.2.24, but should also apply cleanly to HEAD since
the interesting parts in the source in HEAD look identical to those in 2.2.24