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

Re: Referral results sent with an empty scope and filter

> Hello,
> I have added a 'referral' entry (RFC3296) in my directory but,
> apparently, slapd doesn't return exactly the same thing as I put in.
Even though I didn't specify a scope or a filter, the reply URL
> contains '??' at the end, i.e. an empty scope and filter.
> For example, the LDIF contains :
>  ref: ldap://foo.bar/dc=foo,foo=bar
> but is returned as :
>  ldap://foo.bar/dc=foo,dc=bar??
> Why isn't the referral entry sent back verbatim ? Is it "RFC-compliant"
> I ask this because, at the moment, Mozilla refuses to follow referral
URLs which contain a scope of a filter.
> <http://groups.google.com/group/netscape.public.mozilla.directory/browse_frm/thread/8cf16d64b8b00eca>

You don't specify what "your directory" is; since you write to this list,
I'll assume it's OpenLDAP.  It would be nice to know what version you're
using; I'll assume you use the latest, otherwise the discussion is moot.

Usually, as the result of a search request, OpenLDAP may return a search
reference or a referral, both with complete scope portion, i.e. it
specifies if the scope is base, one or sub; typically, whatever was set in
the "ref:" field, the returned referral is rewritten according to the type
of continuation that should occur, based on the base and scope of the
request, as indicated in RFC 3296 (see examples in section 5.3: "Base
Object Considerations").

As a consequence of other operations, it returns a referral URL without
any scope specification, since in those cases there would be no ambiguity;
this is in accordance with section 5.2: "Target Object Considerations".

You don't specify in response to what type of operation you get that URL;
as far as I know, OpenLDAP always puts an explicit scope when returning
search references or referrals in response to search operations, and never
puts anything after the DN when returning referrals in response to other


Ing. Pierangelo Masarati
Responsabile Open Solution
OpenLDAP Core Team

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it