]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Fix unittests that use chunked encoding.
authorAnoop Saldanha <anoopsaldanha@gmail.com>
Fri, 6 Sep 2013 04:07:05 +0000 (09:37 +0530)
committerVictor Julien <victor@inliniac.net>
Fri, 6 Sep 2013 11:13:24 +0000 (13:13 +0200)
src/app-layer-htp.c
src/detect-pcre.c

index 9f894d0334b6f1a9cf3208f725fd681a21549902..e9e74233feda95a690992051af34b56c18abab8b 100644 (file)
@@ -2841,7 +2841,7 @@ int HTPParserTest06(void) {
                          "X-Powered-By: PHP/4.4.7\r\nTransfer-Encoding: "
                          "chunked\r\n"
                          "Content-Type: text/html\r\n\r\n"
-                         "1408\r\n"
+                         "580\r\n"
                          "W2dyb3VwMV0NCnBob25lMT1wMDB3ODgyMTMxMzAyMTINCmxvZ2lu"
                          "MT0NCnBhc3N3b3JkMT0NCnBob25lMj1wMDB3ODgyMTMxMzAyMTIN"
                          "CmxvZ2luMj0NCnBhc3N3b3JkMj0NCnBob25lMz0NCmxvZ2luMz0N"
@@ -2869,7 +2869,7 @@ int HTPParserTest06(void) {
                          "aW42PQ0KcGFzc3dvcmQ2PQ0KY2FsbF90aW1lMT0NCmNhbGxfdGlt"
                          "ZTI9DQpkYXlfbGltaXQ9DQptb250aF9saW1pdD0NCltmaWxlc10N"
                          "Cmxpbms9aHR0cDovLzIwOS4yMDUuMTk2LjE2L2xkL2dldGJvdC5w"
-                         "aHA=0\r\n\r\n";
+                         "aHA=\r\n0\r\n\r\n";
     uint32_t httplen2 = sizeof(httpbuf2) - 1; /* minus the \0 */
     TcpSession ssn;
     HtpState *http_state = NULL;
index b6ef62d11eb63a867b435b024bdb65852312e49a..5fe93fc86fca40d47e82eeaf679a0e18e12f1b78 100644 (file)
@@ -1943,7 +1943,7 @@ static int DetectPcreModifPTest04(void)
         "15"
         "\r\n"
         "<!DOCTYPE html PUBLIC\r\n"
-        "0\r\n";
+        "0\r\n\r\n";
 
     uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */
     TcpSession ssn;
@@ -2067,7 +2067,7 @@ static int DetectPcreModifPTest05(void)
         "\r\n"
         "<!DOC";
 
-    uint8_t httpbuf2[] = "<!DOCTYPE html PUBLIC\r\n0\r\n";
+    uint8_t httpbuf2[] = "<!DOCTYPE html PUBLIC\r\n0\r\n\r\n";
 
     uint32_t httplen1 = sizeof(httpbuf1) - 1; /* minus the \0 */
     uint32_t httplen2 = sizeof(httpbuf2) - 1; /* minus the \0 */