[Zope-dev] collector issue 863 "propfind" bugfix

Simon Eisenmann simon@struktur.de
24 Mar 2003 13:00:19 +0100


--=-npv45qiKB5FvF5lD1QXw
Content-Type: multipart/mixed; boundary="=-LwUszplBEiTfiIeC0TlN"


--=-LwUszplBEiTfiIeC0TlN
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

See: http://collector.zope.org/Zope/863

the attached patch file solves this problem by always setting the
handle_xml method with default parameters if body does not start with
<?xml ..>

the patch is against lib/python/Shared/DC/xml/xmllib.py of zope version
2.6.1

best regards,
 simon



--=20

Simon Eisenmann

[ mailto:simon@struktur.de ]

[ struktur AG | Junghansstra=DFe 5 | 70469 Stuttgart ]
[ T. +49.711.896656.68 | F.+49.711.89665610 ]
[ http://www.struktur.de | mailto:info@struktur.de ]



--=-LwUszplBEiTfiIeC0TlN
Content-Disposition: attachment; filename=xmllib.py-profindpatch.diff
Content-Type: text/plain; name=xmllib.py-profindpatch.diff; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

--- xmllib.py.orginal	2002-08-14 23:51:00.000000000 +0200
+++ xmllib.py	2003-03-24 11:26:29.000000000 +0100
@@ -163,6 +163,11 @@
                 self.lineno =3D self.lineno + string.count(data, '\n')
                 i =3D n
                 break
+            if self.__at_start:
+                if not xmldecl.match(rawdata):
+                    # no <?xml> declaration -> use default
+                    self.handle_xml('','')
+
             res =3D interesting.search(rawdata, i)
             if res:
                 j =3D res.start(0)

--=-LwUszplBEiTfiIeC0TlN--

--=-npv45qiKB5FvF5lD1QXw
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Dies ist ein digital signierter Nachrichtenteil

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQA+fvNT5bzx8aDqO/wRAl6MAJ4rJ2y22SzvBa9MK1TmhHdC3VKvwQCfSJDH
F72m1G48XpUg7anwOFW72ks=
=1+zf
-----END PGP SIGNATURE-----

--=-npv45qiKB5FvF5lD1QXw--