Revision: 14712
Author: adrian.chadd
Date: Thu Jun 10 08:30:03 2010
Log: Extend the repack tests a tiny bit
http://code.google.com/p/lusca-cache/source/detail?r=14712
Modified:
/branches/LUSCA_HEAD/test-suite/atf/libhttp.c
=======================================
--- /branches/LUSCA_HEAD/test-suite/atf/libhttp.c Sun May 16 16:02:08 2010
+++ /branches/LUSCA_HEAD/test-suite/atf/libhttp.c Thu Jun 10 08:30:03 2010
@@ -260,7 +260,6 @@
ATF_REQUIRE(test_http_content_length(&hdr, "abcde") == -1);
/* Clean up */
- httpHeaderReset(&hdr);
httpHeaderClean(&hdr);
}
@@ -300,14 +299,26 @@
ATF_TC_BODY(libhttp_repack_1, tc)
{
HttpHeader hdr;
- char hdrs[1024];
- int i;
struct _http_repack_list r[] =
- { { "Content-Type", "text/html", HDR_CONTENT_TYPE, 1 },
+ { { "Content-Type", "text/html; charset=UTF=8",
HDR_CONTENT_TYPE, 1 },
{ "Foo", "bar", HDR_OTHER, 1 },
{ "Content-Length", "12345", HDR_CONTENT_LENGTH, 1 },
{ "Accept", "*/*", HDR_ACCEPT, 1 },
+ { "Host", "www.creative.net.au", HDR_HOST, 1 },
+ { "Set-Cookie", "@tjackson-11758> use some dyndns-ish stuff for it, or
pay for a static IP from the carrier?", HDR_SET_COOKIE, 1 },
+ { "Date", "Thu, 10 Jun 2010 15:08:25 GMT", HDR_DATE, 1 },
+ { "Server", "Server: Apache/2.2.3 (Debian)", HDR_SERVER, 1 },
+ { "Accept-Ranges", "bytes", HDR_ACCEPT_RANGES, 1 },
+ { "Connection", "close", HDR_CONNECTION, 1 },
+ { "Age", "128", HDR_AGE, 1 },
+ { "X-Origin-Date", "Thu, 10 Jun 2010 15:00:48 GMT",
HDR_OTHER, 1 },
+ { "Via", "1.0 mirror1.jp.cacheboy.net:80 (LUSCA/Lusca_HEAD)", HDR_VIA,
1 },
+ { "X-Cache", "HIT from mirror1.jp.cacheboy.net", HDR_X_CACHE,
1 },
+ { "X-Cache-Age", "128", HDR_OTHER, 1 },
+ { "X-Slashdot", "bender - she'll be right, mate!", HDR_OTHER,
1},
+ { "X-Slashdot-2", "another bender - she'll be right, mate!",
HDR_OTHER, 1},
+
{ NULL, NULL, HDR_UNKNOWN, 0 }};
test_core_init();
@@ -320,8 +331,12 @@
http_hdrs_check_again(&hdr, r);
http_hdrs_repack_del(&hdr, r, 3);
http_hdrs_check_again(&hdr, r);
-
- httpHeaderReset(&hdr);
+ http_hdrs_repack_del(&hdr, r, 15);
+ http_hdrs_check_again(&hdr, r);
+
+#if 0
+ httpHeaderInsertTime(&hdr, 14, HDR_DATE, 123456789);
+#endif
httpHeaderClean(&hdr);
}
--
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en.