diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-10-12 17:55:49 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-10-12 17:55:49 +0000 |
commit | 4e579d9f6026958daf36ff3c3cae014db78f9c51 (patch) | |
tree | 32bf3937d31ea42dce24358e3bd2cc4e9cbf97d3 /epan/dissectors/packet-ajp13.c | |
parent | 17c21b91f242a2536e703d9e0262b1ccd224c695 (diff) | |
download | wireshark-4e579d9f6026958daf36ff3c3cae014db78f9c51.tar.gz wireshark-4e579d9f6026958daf36ff3c3cae014db78f9c51.tar.bz2 wireshark-4e579d9f6026958daf36ff3c3cae014db78f9c51.zip |
From Iain Arnell:
A missing value_ptr parameter in the handling of ajp13 response headers
led to them being displayed differently than the request headers.
This patch also simplifies the offset/length calculation for header
values, and skips the size for consistency with handling of other ajp13
string values.
svn path=/trunk/; revision=39390
Diffstat (limited to 'epan/dissectors/packet-ajp13.c')
-rw-r--r-- | epan/dissectors/packet-ajp13.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/epan/dissectors/packet-ajp13.c b/epan/dissectors/packet-ajp13.c index b579821b98..8bfb1f4e92 100644 --- a/epan/dissectors/packet-ajp13.c +++ b/epan/dissectors/packet-ajp13.c @@ -337,9 +337,7 @@ display_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ajp13_tree, ajp13_con guint8 hid; const gchar *hval; guint16 hval_len, hname_len; - int orig_pos = pos; const gchar* hname = NULL; - int dp = 0; /* int cl = 0; TODO: Content-Length header (encoded by 0x08) is special */ /* HEADER CODE/NAME @@ -363,18 +361,17 @@ display_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ajp13_tree, ajp13_con pos+=hname_len+2; } - dp = pos-orig_pos; - /* HEADER VALUE */ - orig_pos = pos; hval = ajp13_get_nstring(tvb, pos, &hval_len); - pos+=hval_len+2; - dp = pos - orig_pos; + pos+=2; /* skip over size */ if (ajp13_tree) { - proto_tree_add_string_format(ajp13_tree, hf_ajp13_hval, tvb, orig_pos, dp, "%s : %s", hname, hval); + proto_tree_add_string_format(ajp13_tree, hf_ajp13_hval, + tvb, pos, hval_len, hname, + "%s: %s", hname, hval); } + pos+=hval_len; } break; } @@ -576,9 +573,7 @@ display_req_forward(tvbuff_t *tvb, packet_info *pinfo, guint8 hcd; guint8 hid; - int orig_pos = pos; const gchar* hname = NULL; - int dp = 0; int cl = 0; const gchar *hval; guint16 hval_len, hname_len; @@ -600,20 +595,17 @@ display_req_forward(tvbuff_t *tvb, packet_info *pinfo, pos+=hname_len+2; } - dp = pos-orig_pos; - /* HEADER VALUE */ - orig_pos = pos; hval = ajp13_get_nstring(tvb, pos, &hval_len); - pos+=hval_len+2; - dp = pos - orig_pos; + pos+=2; /* skip over size */ if (ajp13_tree) { proto_tree_add_string_format(ajp13_tree, hf_ajp13_hval, - tvb, orig_pos, dp, hname, + tvb, pos, hval_len, hname, "%s: %s", hname, hval); } + pos+=hval_len; if (cl) { cl = atoi(hval); cd->content_length = cl; |