Ethereal-dev: [Ethereal-dev] HTTP chunked decoding patch

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Jerry Talkington <jtalkington@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 Feb 2006 15:14:01 -0800
Here's a tiny patch that will allow for dissecting of chunked coded HTTP
responses when there is an extension or trailing whitespace in the
Transfer-Encoding: header.

Not sure how I overlooked this originally, since the support was added
to req_resp_hdrs.c when the orginal code was submitted...

BTW, I hope this is still the proper way to submit patches.  If I need
to submit a bug, just let me know.  The wiki page describing source code
submissions mentions all the required steps, except where to actually
send the patch ;)

-- 
GPG public key:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9D5B8762
Index: epan/dissectors/packet-http.c
===================================================================
--- epan/dissectors/packet-http.c	(revision 17311)
+++ epan/dissectors/packet-http.c	(working copy)
@@ -923,7 +923,7 @@
 		if (headers.transfer_encoding != NULL &&
 		    strcasecmp(headers.transfer_encoding, "identity") != 0) {
 			if (http_dechunk_body &&
-			    (strcasecmp(headers.transfer_encoding, "chunked")
+			    (strncasecmp(headers.transfer_encoding, "chunked", 7)
 			    == 0)) {
 
 				chunks_decoded = chunked_encoding_dissector(