aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-10-10 19:48:37 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-10-10 19:48:37 +0000
commit37a7e3382c8daea28ea5e38372696d2da7ce5fd7 (patch)
tree8fd2ae571e198b61b5785751fbf68b2ed0703971 /ui/gtk
parentd8231f1222a9861b3512cac592a42dce0509d40f (diff)
Revert the changes made to resolve https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3528 (When following an HTTP tcp stream decode gzip data automatically), as they caused a bigger problem reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9044 ("Follow TCP Stream" shows only first HTTP req+res).
#BACKPORT(1.10) svn path=/trunk/; revision=52506
Diffstat (limited to 'ui/gtk')
-rw-r--r--ui/gtk/Makefile.nmake2
-rw-r--r--ui/gtk/follow_tcp.c82
2 files changed, 1 insertions, 83 deletions
diff --git a/ui/gtk/Makefile.nmake b/ui/gtk/Makefile.nmake
index 3b9c2fe9a9..e75c6b8d39 100644
--- a/ui/gtk/Makefile.nmake
+++ b/ui/gtk/Makefile.nmake
@@ -12,7 +12,7 @@ include ..\..\Makefile.nmake.inc
GENERATED_CFLAGS=\
$(STANDARD_CFLAGS) \
/Zm800 \
- /I../.. /I../../wiretap $(GTK_CFLAGS) $(ZLIB_CFLAGS) $(GNUTLS_CFLAGS) \
+ /I../.. /I../../wiretap $(GTK_CFLAGS) $(GNUTLS_CFLAGS) \
/I$(PCAP_DIR)\WPCAP\LIBPCAP /I$(PCAP_DIR)\WPCAP\LIBPCAP\bpf \
/I$(PCAP_DIR)\WPCAP\LIBPCAP\lbl \
/I$(PCAP_DIR)\include $(AIRPCAP_CFLAGS) \
diff --git a/ui/gtk/follow_tcp.c b/ui/gtk/follow_tcp.c
index 8ca8be452a..14651d68d9 100644
--- a/ui/gtk/follow_tcp.c
+++ b/ui/gtk/follow_tcp.c
@@ -67,10 +67,6 @@
#include "ui/gtk/follow_stream.h"
#include "ws_symbol_export.h"
-#ifdef HAVE_LIBZ
-#include <zlib.h>
-#endif
-
/* With MSVC and a libwireshark.dll, we need a special declaration. */
WS_DLL_PUBLIC FILE *data_out_file;
@@ -355,13 +351,6 @@ follow_read_tcp_stream(follow_info_t *follow_info,
char buffer[FLT_BUF_SIZE+1]; /* +1 to fix ws bug 1043 */
size_t nchars;
frs_return_t frs_return;
-#ifdef HAVE_LIBZ
- char outbuffer[FLT_BUF_SIZE+1];
- z_stream strm;
- gboolean gunzip = FALSE;
- int ret;
-#endif
-
iplen = (follow_info->is_ipv6) ? 16 : 4;
@@ -414,77 +403,6 @@ follow_read_tcp_stream(follow_info_t *follow_info,
/* XXX - if we don't get "bcount" bytes, is that an error? */
bytes_read += nchars;
-#ifdef HAVE_LIBZ
- /* If we are on the first packet of an HTTP response, check if data is gzip
- * compressed.
- */
- if (is_server && bytes_read == nchars && !memcmp(buffer, "HTTP", 4)) {
- size_t header_len;
- gunzip = parse_http_header(buffer, nchars, &header_len);
- if (gunzip) {
- /* show header (which is not gzipped)*/
- frs_return = follow_show(follow_info, print_line_fcn_p, buffer,
- header_len, is_server, arg, global_pos,
- &server_packet_count, &client_packet_count);
- if (frs_return == FRS_PRINT_ERROR) {
- fclose(data_out_file);
- data_out_file = NULL;
- return frs_return;
- }
-
- /* init gz_stream*/
- strm.next_in = Z_NULL;
- strm.avail_in = 0;
- strm.next_out = Z_NULL;
- strm.avail_out = 0;
- strm.zalloc = Z_NULL;
- strm.zfree = Z_NULL;
- strm.opaque = Z_NULL;
- ret = inflateInit2(&strm, MAX_WBITS+16);
- if (ret != Z_OK) {
- fclose(data_out_file);
- data_out_file = NULL;
- return FRS_READ_ERROR;
- }
-
- /* prepare remainder of buffer to be inflated below */
- memmove(buffer, buffer+header_len, nchars-header_len);
- nchars -= header_len;
- }
- }
-
- if (gunzip) {
- strm.next_in = buffer;
- strm.avail_in = (int)nchars;
- do {
- strm.next_out = outbuffer;
- strm.avail_out = FLT_BUF_SIZE;
-
- ret = inflate(&strm, Z_NO_FLUSH);
- if (ret < 0 || ret == Z_NEED_DICT) {
- inflateEnd(&strm);
- fclose(data_out_file);
- data_out_file = NULL;
- return FRS_READ_ERROR;
- } else if (ret == Z_STREAM_END) {
- inflateEnd(&strm);
- }
-
- frs_return = follow_show(follow_info, print_line_fcn_p, outbuffer,
- FLT_BUF_SIZE-strm.avail_out, is_server,
- arg, global_pos,
- &server_packet_count,
- &client_packet_count);
- if(frs_return == FRS_PRINT_ERROR) {
- inflateEnd(&strm);
- fclose(data_out_file);
- data_out_file = NULL;
- return frs_return;
- }
- } while (strm.avail_out == 0);
- skip = TRUE;
- }
-#endif
if (!skip) {
frs_return = follow_show(follow_info, print_line_fcn_p, buffer,
nchars, is_server, arg, global_pos,