After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 310636 - libgnomevfs2-common: privoxy's use of "Transfer-Encoding: identity" breaks neon
libgnomevfs2-common: privoxy's use of "Transfer-Encoding: identity" breaks neon
Status: RESOLVED WONTFIX
Product: gnome-vfs
Classification: Deprecated
Component: Module: http
2.10.x
Other Linux
: High normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-17 07:59 UTC by Loïc Minier
Modified: 2008-09-06 19:05 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
fix transfer encoding chunked (1.07 KB, patch)
2005-09-30 07:36 UTC, Loïc Minier
none Details | Review

Description Loïc Minier 2005-07-17 07:59:40 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,
Comment 1 Loïc Minier 2005-09-30 07:36:59 UTC
Created attachment 52846 [details] [review]
fix transfer encoding chunked
Comment 2 jorton 2007-08-10 10:43:44 UTC
I have fixed this upstream for neon 0.27 and will backport to 0.26.x if there are further 0.26.x releases.
Comment 3 André Klapper 2008-09-06 19:05:19 UTC
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