]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix HttpReply unit-test in the right place
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 3 Nov 2009 07:57:33 +0000 (20:57 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 3 Nov 2009 07:57:33 +0000 (20:57 +1300)
src/tests/testHttpReply.cc

index b00cdb4d3238ffa8b0823edb48581599722eee4a..837e9e31491930b95056093ff4f7204a876252de 100644 (file)
@@ -106,6 +106,9 @@ testHttpReply::testSanityCheckFirstLine()
     CPPUNIT_ASSERT_EQUAL(error, HTTP_STATUS_NONE);
     input.reset();
     error = HTTP_STATUS_NONE;
+    /* NP: the engine saves details about the protocol. even when being reset :( */
+    engine.protoPrefix="HTTP/";
+    engine.reset();
 
     // empty status line
     input.append("\n\n", 2);
@@ -128,8 +131,6 @@ testHttpReply::testSanityCheckFirstLine()
     CPPUNIT_ASSERT(engine.sanityCheckStartLine(&input, hdr_len, &error) );
     CPPUNIT_ASSERT_EQUAL(error, HTTP_STATUS_NONE);
     input.reset();
-    engine.reset();
-    engine.protoPrefix="HTTP/";
     error = HTTP_STATUS_NONE;
 
     input.append("HTTP/1.1 200 \n\n", 15); /* real case seen */