diff options
Diffstat (limited to 'epan/dissectors/packet-spdy.c')
-rw-r--r-- | epan/dissectors/packet-spdy.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/epan/dissectors/packet-spdy.c b/epan/dissectors/packet-spdy.c index 19640100ba..30835896c8 100644 --- a/epan/dissectors/packet-spdy.c +++ b/epan/dissectors/packet-spdy.c @@ -40,6 +40,7 @@ #include <epan/tap.h> #include "packet-tcp.h" #include "packet-ssl.h" +#include "packet-http.h" #ifdef HAVE_ZLIB #define ZLIB_CONST @@ -177,6 +178,7 @@ typedef struct _spdy_data_frame_t { } spdy_data_frame_t; typedef struct _spdy_stream_info_t { + http_type_t message_type; gchar *content_type; gchar *content_type_parameters; gchar *content_encoding; @@ -514,6 +516,7 @@ static spdy_conv_t * get_or_create_spdy_conversation_data(packet_info *pinfo) { */ static void spdy_save_stream_info(spdy_conv_t *conv_data, guint32 stream_id, + http_type_t message_type, gchar *content_type, gchar *content_type_params, gchar *content_encoding) { @@ -524,6 +527,7 @@ static void spdy_save_stream_info(spdy_conv_t *conv_data, } si = (spdy_stream_info_t *)wmem_alloc(wmem_file_scope(), sizeof(spdy_stream_info_t)); + si->message_type = message_type; si->content_type = content_type; si->content_type_parameters = content_type_params; si->content_encoding = content_encoding; @@ -725,6 +729,7 @@ static int dissect_spdy_data_payload(tvbuff_t *tvb, dissector_handle_t handle; guint num_data_frames; gboolean dissected; + http_message_info_t message_info; /* Add frame description. */ proto_item_append_text(spdy_proto, ", Stream: %d, Length: %d", @@ -911,11 +916,13 @@ static int dissect_spdy_data_payload(tvbuff_t *tvb, handle = dissector_get_string_handle(media_type_subdissector_table, si->content_type); } + message_info.type = si->message_type; + message_info.media_str = media_str; if (handle != NULL) { /* * We have a subdissector - call it. */ - dissected = call_dissector_with_data(handle, data_tvb, pinfo, spdy_tree, media_str); + dissected = call_dissector_with_data(handle, data_tvb, pinfo, spdy_tree, &message_info); } else { dissected = FALSE; } @@ -925,7 +932,7 @@ static int dissect_spdy_data_payload(tvbuff_t *tvb, * Calling the default media handle if there is a content-type that * wasn't handled above. */ - call_dissector_with_data(media_handle, next_tvb, pinfo, spdy_tree, media_str); + call_dissector_with_data(media_handle, next_tvb, pinfo, spdy_tree, &message_info); } else { /* Call the default data dissector */ call_data_dissector(next_tvb, pinfo, spdy_tree); @@ -1328,8 +1335,9 @@ static int dissect_spdy_header_payload( */ if (content_type != NULL && !pinfo->fd->flags.visited) { gchar *content_type_params = spdy_parse_content_type(content_type); - spdy_save_stream_info(conv_data, stream_id, content_type, - content_type_params, content_encoding); + spdy_save_stream_info(conv_data, stream_id, + (hdr_status == NULL) ? HTTP_REQUEST : HTTP_RESPONSE, + content_type, content_type_params, content_encoding); } return frame->length; |