diff --git a/Changelog b/Changelog index 54b807f..eabb284 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,9 @@ +1.29 + - BUGFIX: HTTP GET was broken after version 1.28, since it showed the + file as being sent from client to server, not the otehr way round. + Both HTTP POST and GET now show the correct directions in transferring + the files. Thanks again Nick! + 1.28 - Bugfix in the http module. The POST should obviously have the client upload data to the server, not the other way round. Fixed now. diff --git a/file2pcap.c b/file2pcap.c index 3d4f186..dc1b519 100644 --- a/file2pcap.c +++ b/file2pcap.c @@ -827,6 +827,7 @@ int httpPost(struct handover *ho) { tcpHandshake(ho); httpPostRequest(ho); + ho->direction = TO_SERVER; httpTransferFile(ho); httpPostFinalBoundary(ho); tcpShutdown(ho); diff --git a/file2pcap.h b/file2pcap.h index 9dadaff..8424cd6 100644 --- a/file2pcap.h +++ b/file2pcap.h @@ -2,7 +2,7 @@ #include // struct ip6_hdr -#define VERSION "1.28" +#define VERSION "1.29" #define INTERVAL 13000 //About 70 packets per second #define READ_SIZE 1200 diff --git a/http.c b/http.c index 093b793..44b0cce 100644 --- a/http.c +++ b/http.c @@ -222,7 +222,7 @@ int httpTransferFile(struct handover *ho) { } else if(ho->httpEncoder == ENC_HTTP_CHUNKED) { - tcpSendHttpChunked(ho, NULL, 0, TO_SERVER); + tcpSendHttpChunked(ho, NULL, 0, ho->direction); } return 0; @@ -230,11 +230,11 @@ int httpTransferFile(struct handover *ho) { if(ho->httpEncoder == ENC_HTTP_CHUNKED || ho->httpEncoder == ENC_HTTP_GZIP_CHUNKED) { - tcpSendHttpChunked(ho, buffer, count, TO_SERVER); + tcpSendHttpChunked(ho, buffer, count, ho->direction); } else { - tcpSendData(ho, buffer, count, TO_SERVER); + tcpSendData(ho, buffer, count, ho->direction); } }