]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
http: remove obsolete checks for files
authorPhilippe Antoine <pantoine@oisf.net>
Fri, 7 Jul 2023 08:39:11 +0000 (10:39 +0200)
committerVictor Julien <vjulien@oisf.net>
Mon, 10 Jul 2023 07:27:00 +0000 (09:27 +0200)
With libhtp having been improved, Suricata does not need to check
that there is either a response line or HTTP/0.9 as libhtp
will trigger the callbacks only in those cases

src/app-layer-htp.c

index f3e0ad2e81ff83602efd88349b7c8acf279c2933..ce9fe2b477cfbee38a53bfa417606e9cbaa8fa65 100644 (file)
@@ -1766,9 +1766,7 @@ static int HtpResponseBodyHandle(HtpState *hstate, HtpTxUserData *htud,
      * we check for tx->response_line in case of junk
      * interpreted as body before response line
      */
-    if (!(htud->tcflags & HTP_FILENAME_SET) &&
-        (tx->response_line != NULL || tx->is_protocol_0_9))
-    {
+    if (!(htud->tcflags & HTP_FILENAME_SET)) {
         SCLogDebug("setting up file name");
 
         uint8_t *filename = NULL;
@@ -1818,9 +1816,7 @@ static int HtpResponseBodyHandle(HtpState *hstate, HtpTxUserData *htud,
                 htud->tcflags &= ~HTP_DONTSTORE;
             }
         }
-    }
-    else if (tx->response_line != NULL || tx->is_protocol_0_9)
-    {
+    } else {
         /* otherwise, just store the data */
 
         if (!(htud->tcflags & HTP_DONTSTORE)) {