diff options
Diffstat (limited to 'epan/dissectors/packet-http.c')
-rw-r--r-- | epan/dissectors/packet-http.c | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c index 80a102278a..036315eaa4 100644 --- a/epan/dissectors/packet-http.c +++ b/epan/dissectors/packet-http.c @@ -766,26 +766,23 @@ dissect_http_message(tvbuff_t *tvb, int offset, packet_info *pinfo, break; } - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, proto_tag); - if (check_col(pinfo->cinfo, COL_INFO)) { - /* - * Put the first line from the buffer into the summary - * if it's an HTTP request or reply (but leave out the - * line terminator). - * Otherwise, just call it a continuation. - * - * Note that "tvb_find_line_end()" will return a value that - * is not longer than what's in the buffer, so the - * "tvb_get_ptr()" call won't throw an exception. - */ - if (is_request_or_reply) { - line = tvb_get_ptr(tvb, offset, first_linelen); - col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", format_text(line, first_linelen)); - } - else - col_set_str(pinfo->cinfo, COL_INFO, "Continuation or non-HTTP traffic"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, proto_tag); + /* + * Put the first line from the buffer into the summary + * if it's an HTTP request or reply (but leave out the + * line terminator). + * Otherwise, just call it a continuation. + * + * Note that "tvb_find_line_end()" will return a value that + * is not longer than what's in the buffer, so the + * "tvb_get_ptr()" call won't throw an exception. + */ + if (is_request_or_reply) { + line = tvb_get_ptr(tvb, offset, first_linelen); + col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", format_text(line, first_linelen)); } + else + col_set_str(pinfo->cinfo, COL_INFO, "Continuation or non-HTTP traffic"); orig_offset = offset; if (tree) { @@ -2650,8 +2647,7 @@ dissect_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * first HTTP message; set a fence so that subsequent * HTTP messages don't overwrite the Info column. */ - if (check_col(pinfo->cinfo, COL_INFO)) - col_set_fence(pinfo->cinfo, COL_INFO); + col_set_fence(pinfo->cinfo, COL_INFO); } } } |