Skip to content

Commit

Permalink
from bryant eastham
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ronnie Sahlberg committed Sep 12, 2006
1 parent 3dc82c3 commit b61e42b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
18 changes: 10 additions & 8 deletions epan/dissectors/packet-http.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
/*
Expand All @@ -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:
Expand Down

0 comments on commit b61e42b

Please sign in to comment.