From: Graham B. <gb...@po...> - 2002-08-15 18:17:50
|
On Thu, Aug 15, 2002 at 09:02:54AM +0100, Chris Ridd wrote: > 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. Yeah, I realized that after I posted. I also wrote this test #!perl -l use Net::LDAP::Filter; $filter = "(&(whenCreated >= 20020812000000.0Z) (whenCreated <= 20020812235959.0Z))"; print Net::LDAP::Filter->new($filter)->as_string; $filter = "(&(whenCreated>=20020812000000.0Z) (whenCreated<=20020812235959.0Z))"; print Net::LDAP::Filter->new($filter)->as_string; __END__ (&(whenCreated>= 20020812000000.0Z)(whenCreated<= 20020812235959.0Z)) (&(whenCreated>=20020812000000.0Z)(whenCreated<=20020812235959.0Z)) As you can see it ignores whitespace before the operator, but not after. Re-reading the RFC I dont really want to change it. If there are other libraries that ignore whitespace after the operator, I would say they are broken. Graham. |