On Thu, Dec 15, 2005 at 10:12:27AM +0000, Gary Coady wrote:
> Daniel Veillard wrote:
> > On Thu, Dec 15, 2005 at 03:51:38AM +0000, Gary Coady wrote:
> >
> >>Hi there,
> >>attached is a sample patch which might be useful for retrieving
> >>compressed resources over HTTP. It sends the "Accept-Encoding" header,
> >>and then passes the response through zlib if the "Content-Encoding"
> >>response header is appropriately set.
> >
> >
> > Sounds cool, but I'm a bit worried by the case where the return is not
> > compressed, in xmlNanoHTTPRead() you will pass
> > if (ctxt->usesGzip == 1 && ctxt->strm == NULL)
> > because ctxt->usesGzip should be 0, but ctxt->strm will be NULL and
> > will be dereferenced on the next line. It seems to me that this whole
> > chunk of code need to be garded by
> > if (ctxt->usesGzip) {
> > ....
> > }
> > and normal existent code should be run in the default case. Otherwise the
> > patch looks fine. Can you confirm my analysis ?
>
> I realized this morning that I hadn't handled the non-gzip case, but
> didn't quite get into work before you looked at the patch :-)
haha :-)
> An updated patch is attached.
looks good, applied, works fine for me, commited !
thanks a lot !
Daniel
--
Daniel Veillard | Red Hat http://redhat.com/
[EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml