aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-09-12 11:39:51 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2006-09-12 11:39:51 +0000
commitb61e42bc3ac7cc537d61165df671d36f74e6f3f7 (patch)
tree3a31605b5476be53c3e47ce353823220604cecdb
parent3dc82c316d1ef19a582873c9b91694bb3846aaac (diff)
from bryant eastham
Also, there is still an outstanding issue regarding the default use of the "media" dissector. The way it is currently coded there is no way to have a heuristic decoder when a content-type header is specified. In this way if there is a decoder for a specific content-type then it will be used, then the heuristic decoders have a chance, and finally the default of either the media-type decoder of the http_payload decoder. svn path=/trunk/; revision=19208
-rw-r--r--AUTHORS1
-rw-r--r--epan/dissectors/packet-http.c18
2 files changed, 11 insertions, 8 deletions
diff --git a/AUTHORS b/AUTHORS
index 26a4adaf06..c382b7f327 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -2653,6 +2653,7 @@ Daniel Black <dragonheart [AT] gentoo.org>
Christoph Werle <Christoph.Werle [AT] ira.uka.de>
Aaron Christensen <aaronmf [AT] gmail.com>
Ian Abel <ianabel [AT] mxtelecom.com>
+Bryant Eastham <beastham [AT] slc.mew.com>
Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to
give his permission to use his version of snprintf.c.
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c
index c3995a6d6c..da33b3fe33 100644
--- a/epan/dissectors/packet-http.c
+++ b/epan/dissectors/packet-http.c
@@ -1097,12 +1097,6 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
handle = dissector_get_string_handle(
media_type_subdissector_table,
headers.content_type);
- /*
- * Calling the default media handle otherwise
- */
- if (handle == NULL) {
- handle = media_handle;
- }
}
if (handle != NULL) {
/*
@@ -1127,8 +1121,16 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (ti != NULL)
proto_item_set_len(ti, offset);
} else {
- /* Call the subdissector (defaults to data) */
- http_payload_subdissector(next_tvb, tree, http_tree, pinfo);
+ if (headers.content_type != NULL) {
+ /*
+ * Calling the default media handle if there is a content-type that
+ * wasn't handled above.
+ */
+ call_dissector(media_handle, next_tvb, pinfo, tree);
+ } else {
+ /* Call the subdissector (defaults to data), otherwise. */
+ http_payload_subdissector(next_tvb, tree, http_tree, pinfo);
+ }
}
body_dissected: