apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: opposite of apr_xml_quote_string() ?
Date Wed, 09 Mar 2005 08:54:38 GMT
On Tue, Mar 08, 2005 at 05:10:46PM -0600, Ben Collins-Sussman wrote:
> On Mar 8, 2005, at 2:20 PM, Joe Orton wrote:
> >On Tue, Mar 08, 2005 at 11:41:51AM -0600, Ben Collins-Sussman wrote:
> >>I'm working on the svn 1.2 "locking" feature, and I've come to a point
> >>where mod_dav_svn needs to xml-unescape the incoming comment attached
> >>to a DAV lock, so that it ends up being stored in the svn repository 
> >>as
> >>something human-readable.  (For complex reasons, neither httpd nor
> >>mod_dav is xml-unescaping the data.)
> >>
> >>I've searched high and low through apr, apr-util, httpd, and svn APIs.
> >>I've found apr_xml_quote_string() as a nice way of xml-escaping data,
> >>but I've not found anything to xml-unescape.
> >
> >It's because the XML parser does it automatically; you never normally
> >get to see the escaped form when parsing the XML.  How complex are 
> >these
> >complex reasons - is the data getting XML-escaped twice, or something?
> >
> An svn client uses neon to send a DAV lock to mod_dav.  mod_dav treats 
> the <D:owner> field as sacred, and refuses to xml-unescape it or touch 
> it at all.  Then it hands all the fields down to mod_dav_svn.

mod_dav never chooses nor refuses to "XML unescape" anything: the XML
parser *always* does it unconditionally, so I still don't understand
what's going on.  If the fields passed down to mod_dav_svn are
XML-escaped, either mod_dav has *chosen* to re-XML-escape it (I can't
see where that would be happening), or it was double-escaped to begin

Can you check protocol traces?


View raw message