diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-09-12 11:39:51 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-09-12 11:39:51 +0000 |
commit | b61e42bc3ac7cc537d61165df671d36f74e6f3f7 (patch) | |
tree | 3a31605b5476be53c3e47ce353823220604cecdb /epan/dissectors/packet-http.c | |
parent | 3dc82c316d1ef19a582873c9b91694bb3846aaac (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
Diffstat (limited to 'epan/dissectors/packet-http.c')
-rw-r--r-- | epan/dissectors/packet-http.c | 18 |
1 files changed, 10 insertions, 8 deletions
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: |