GNOME Bugzilla – Bug 310636
libgnomevfs2-common: privoxy's use of "Transfer-Encoding: identity" breaks neon
Last modified: 2008-09-06 19:05:19 UTC
Hi, Michael Shields reported in Debian bug http://bugs.debian.org/318686: > When privoxy receives a page using Transfer-Encoding: chunked, and then > de-chunks it for filtering, it changes the header to "identity". This > value of the header was included in RFC 2616 by mistake; the working group > meant to pull it out. See <http://purl.org/NET/http-errata#identity> > and the http-wg mailing list archives for discussion of this. >. > Specifically, this breaks the libneon that is bundled with vfs2, > and therefore gweather-applet. I am reporting a bug (#318683) against > Privoxy also, with a patch to cause it not to send this header. However, > I believe that libneon is also at fault for assuming that any T-E header > implies the chunked encoding it asked for. The attached patch makes > vfs2 tolerant of code that implemented the RFC as published. He proposed the following patch: --- gnome-vfs2-2.10.1/imported/neon.old/ne_request.c 2005-01-30 11:59:55.000000000 +0000 +++ gnome-vfs2-2.10.1/imported/neon/ne_request.c 2005-07-17 01:43:26.000000000 +0000 @@ -480,14 +480,18 @@ return (st->klass == 2); } -/* Handler for the "Transfer-Encoding" response header: treat *any* - * such header as implying a chunked response, per the "Protocol - * Compliance" statement in the manual. */ +/* Handler for the "Transfer-Encoding" response header. Previous + * versions treated *any* such header as implying a chunked response. + * However, we need to handle at least "Transfer-Encoding: identity" + * also (by ignoring it). This was included in RFC 2616 by mistake + * (see http://purl.org/NET/http-errata#identity), but it is there, + * and Privoxy uses it at least through version 3.0.3. */ static void te_hdr_handler(void *userdata, const char *value) { struct ne_response *resp = userdata; - - resp->mode = R_CHUNKED; + if (strcasecmp(value, "chunked") == 0) { + resp->mode = R_CHUNKED; + } } /* Handler for the "Connection" response header */ Bye,
Created attachment 52846 [details] [review] fix transfer encoding chunked
I have fixed this upstream for neon 0.27 and will backport to 0.26.x if there are further 0.26.x releases.
gnome-vfs has been deprecated and superseded by gio/gvfs since GNOME 2.22, hence mass-closing many of the gnome-vfs requests/bug reports. This means that gnome-vfs is NOT actively maintained anymore, however patches are still welcome. If your reported issue is still valid for gio/gvfs, please feel free to file a bug report against glib/gio or gvfs. @Bugzilla mail recipients: query for gnome-vfs-mass-close to get rid of these notification emails all together. General further information: http://en.wikipedia.org/wiki/GVFS Reasons behind this decision are listed at http://www.mail-archive.com/gnome-vfs-list@gnome.org/msg00899.html