diff options
author | Ryan Doyle <ryan@doylenet.net> | 2017-03-27 21:48:26 +1100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-06-22 16:22:59 +0000 |
commit | f24ffb0bcd12c3dce1e48b7a34c48a6be62c45e4 (patch) | |
tree | dfdced4d009cadc87546597fdccf954cfc66d289 /test/suite-dissection.sh | |
parent | cfb23d874345eede2860afa155b181a2e2e208c0 (diff) |
http2: reassemble entity bodies in data frames
This commit reassembles data frames to build up the full entity body. It does
this for both client/server request and responses. Additionally, it also
decompresses bodies if they have the correct content-encoding header provided
and are not partial bodies.
Bug: 13543
Change-Id: I1661c9ddd09c1f6cf5a08b2b1921f95103aebb52
Reviewed-on: https://code.wireshark.org/review/20737
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'test/suite-dissection.sh')
-rwxr-xr-x | test/suite-dissection.sh | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/test/suite-dissection.sh b/test/suite-dissection.sh new file mode 100755 index 0000000000..dc003fde08 --- /dev/null +++ b/test/suite-dissection.sh @@ -0,0 +1,60 @@ +#!/bin/bash +# +# Test suite for various ad-hoc dissection tests +# +# Wireshark - Network traffic analyzer +# By Gerald Combs <gerald@wireshark.org> +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# + +dissection_http2_data_reassembly_test() { + if [ $HAVE_NGHTTP2 -ne 0 ]; then + test_step_skipped + return + fi + + local filename="${CAPTURE_DIR}/http2-data-reassembly.pcap" + local keys="${TESTS_DIR}/keys/http2-data-reassembly.keys" + + # Check for a reassembled PNG image. + $TSHARK -o ssl.keylog_file:$keys -d 'tcp.port==8443,ssl' \ + -Y 'http2.data.data matches "PNG" && http2.data.data matches "END"' \ + -r $filename |grep -q DATA + + if [ $? -ne 0 ]; then + test_step_failed "could not find DATA frame with reassembled PNG content" + else + test_step_ok + fi + return +} + +dissection_suite() { + test_step_add "testing http2 data reassembly" dissection_http2_data_reassembly_test +} + +# +# Editor modelines - https://www.wireshark.org/tools/modelines.html +# +# Local variables: +# sh-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# |