oacs-dav WebDAV support pakcage does this:
ad_proc oacs_dav::urlencode { string } {
urlencode allowing characters according to rfc 1738
http://www.w3.org/Addressing/rfc1738.txt
"Thus, only alphanumerics, the special characters "$-_.+!*'(),", and
reserved characters used for their reserved purposes may be used
unencoded within a URL."
ignore + used to encode spaces in query strings
This is mainly to support MS Web Folders which do not follow the
spec which states that any character may be urlencoded. Web Folders
rejects the entire collection as invalid if a filename contains
one of these characters encoded.} {
set encoded_string [ns_urlencode $string]
set encoded_string [string map -nocase \
{+ %20 %2d - %5f _ %24 $ %2e . %21 ! %28 ( %29 ) %27 ' %2c ,} $encoded_string]
return $encoded_string
}
its not pretty but it works. Perhaps we should add this to acs-tcl as ad_urlencode until AOLserver is fixed.
I am pretty sure I discussed this on the AOLserver list or in email with AOLserver folks back when I did the tDAV work and never got any resolution. ns_urlencode has been overly agressive forever.