[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r14041 - in trunk/subversion: libsvn_ra_dav mod_dav_svn tests/clients/cmdline

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-04-12 08:32:31 CEST

On Tue, 11 Apr 2005 kfogel@collab.net wrote:

> cmpilato@tigris.org writes:
> > --- trunk/subversion/mod_dav_svn/update.c (original)
> > +++ trunk/subversion/mod_dav_svn/update.c Fri Apr 8 10:23:36 2005
> > @@ -998,6 +998,40 @@
> > }
> >
> >
> > +static svn_stringbuf_t *
> > +string_from_cdata_pieces(apr_xml_elem *element,
> > + apr_pool_t *pool)
> > +{
> > + svn_stringbuf_t *buf;
> > + struct apr_text *this_elem;
> > +
> > + /* No CDATA? That's badness. */
> > + if (! element->first_cdata.first)
> > + return NULL;
> > +
> > + buf = svn_stringbuf_create(element->first_cdata.first->text, pool);
> > + this_elem = element->first_cdata.first->next;
> > + while (this_elem)
> > + {
> > + svn_stringbuf_appendcstr(buf, this_elem->text);
> > + this_elem = this_elem->next;
> > + }
> > + return buf;
> > +}
>
There is an dav_xml_get_cdata in mod_dav.h that we use in other places.

> > +static dav_error *
> > +empty_cdata_error(const char *tagname,
> > + apr_pool_t *pool)
> > +{
> > + const char *errstr = apr_pstrcat(pool, "The request's '", tagname,
> > + "' element contains empty cdata; there "
> > + "is a problem with the client.", NULL);
> > + return dav_new_error_tag(pool, HTTP_BAD_REQUEST, 0, errstr,
> > + SVN_DAV_ERROR_NAMESPACE, SVN_DAV_ERROR_TAG);
> > +}
>
The terminology is a little strange here. There is no such thing as "empty
cdata"; an element might be empty. If you use dav_xml_get_cdata, you'll
get an empty string back and avoid this kludge.

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 12 08:27:42 2005

This is an archived mail posted to the Subversion Dev mailing list.