Subject: LDAPUrl encode/decode in java-api-11

From: "Steve Sonntag" <[email-masked]>
Date: Wed, 20 Sep 2000 14:50:29 -0600

I am trying to understand the encode/decode functions
in the LDAPUrl class.

I assume that the encode method turns unsafe characters
(as defined by RFC1738, RFC 2255, & etc.) into characters
of the form %HH and that decode turns those characters
back into the raw unencoded characters.

Question 1: The reference to decoding "+" into " "
and encoding " " into "+" .  I could not find any reference
to the need for doing this in the RFCs.  Could someone
please tell me why someone might expect that this behavior?

Question 2:  What kind of strings do the constructors of the
LDAPUrl class expect.  Do the constructors expect the 
strings to be already encoded?

Question 3:  Does the encode method take into account the field
in the URL when doing the encoding (e.g. filters vs. base DN) which
may have different reserved characters and thus slightly different
encoding rules ― which boils down to the real question - does 
the encode function expect a full correctly formatted URL
or can one hand it just the base-DN, or just the filter and
expect it to be correctly encoded?

i.e., does the LDAPUrl constructor with individual parts expect 
encoded strings and will the encode function do it?

------------------------
Steve Sonntag
Novell, Inc., the leading provider of Net services software