From: Chris R. <chr...@me...> - 2002-08-15 08:00:13
|
"Vanole, Mike" <mik...@at...> wrote: > Thank you for your input Chris. > > I did look at the RFC first but it couldn't help me with this. The problem > was so simple I can't believe there was even a problem. > > This filter fails: > $filter = "(&(whenCreated >= 20020812000000.0Z) (whenCreated <= > 20020812235959.0Z))"; > > and this filter succeeds: > $filter = "(&(whenCreated>=20020812000000.0Z) > (whenCreated<=20020812235959.0Z))"; > > The only difference is the space character before and after the ordering > matches. I don't know if this is by design or specific to my environment, > but if it is a requirement maybe the next release of Net::LDAP could strip > this stuff out where required. Ah, I hadn't noticed the whitespace before. The grammar in RFC 2254 doesn't appear to permit additional whitespace in the expression, so you should probably try to avoid adding it where you don't need it. Possibly the whitespace in front of the values you're testing (" 20020812000000.0Z") are being considered as part of the value to be compared against, which is also causing problems. Anyway, I suspect removing unnecessary whitespace from your filter string will solve at least some of your problems. Cheers, Chris |