From: Amos Jeffries Date: Tue, 3 Nov 2009 07:57:33 +0000 (+1300) Subject: Fix HttpReply unit-test in the right place X-Git-Tag: SQUID_3_2_0_1~624 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0f74129122d24008cd6a973a8f7786ab802a073a;p=thirdparty%2Fsquid.git Fix HttpReply unit-test in the right place --- diff --git a/src/tests/testHttpReply.cc b/src/tests/testHttpReply.cc index b00cdb4d32..837e9e3149 100644 --- a/src/tests/testHttpReply.cc +++ b/src/tests/testHttpReply.cc @@ -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 */