]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
http/multipart: use proper progress value to test eof
authorVictor Julien <victor@inliniac.net>
Mon, 25 Nov 2019 13:03:13 +0000 (14:03 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 5 Dec 2019 12:49:26 +0000 (13:49 +0100)
src/app-layer-htp.c

index 2fbfadd8a9d7454f13bd6436686ae8879f7bf3fe..5a85aa45676813f7986dde65d91ed96d813d2ced 100644 (file)
@@ -1342,7 +1342,7 @@ static int HtpRequestBodyHandleMultipart(HtpState *hstate, HtpTxUserData *htud,
                 filedata_len = form_end - filedata;
             } else if (form_end != NULL && form_end == header_start) {
                 filedata_len = form_end - filedata - 2; /* 0d 0a */
-            } else if (tx_progress > HTP_RESPONSE_BODY) {
+            } else if (tx_progress > HTP_REQUEST_BODY) {
                 filedata_len = chunks_buffer_len;
                 flags = FILE_TRUNCATED;
             }