Revision: 14657
Author: adrian.chadd
Date: Thu May 13 03:05:36 2010
Log:
Add in a test case for whitespace in header field names.


http://code.google.com/p/lusca-cache/source/detail?r=14657

Modified:
 /branches/LUSCA_HEAD/test-suite/atf/libhttp.c

=======================================
--- /branches/LUSCA_HEAD/test-suite/atf/libhttp.c       Thu May 13 03:00:15 2010
+++ /branches/LUSCA_HEAD/test-suite/atf/libhttp.c       Thu May 13 03:05:36 2010
@@ -175,7 +175,6 @@
atf_tc_set_md_var(tc, "descr", "Check that duplicate Content-Length headers are "
            "correctly replaced with the relaxed HTTP parser enabled");
 }
-
 ATF_TC_BODY(libhttp_parse_content_length_2, tc)
 {
        test_core_init();
@@ -185,6 +184,16 @@
libhttp_test_content_length_parser("Content-Length: 23456\r\nContent-Length: 12345\r\n", "23456"); libhttp_test_content_length_parser("Content-Length: 23456\r\nContent-Length: 12345\r\nContent-Length: 23456\r\n", "23456");
 }
+
+ATF_TC(libhttp_parser_other_whitespace_1);
+ATF_TC_HEAD(libhttp_parser_other_whitespace_1, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Headers must not have whitespace in the field names");
+}
+ATF_TC_BODY(libhttp_parser_other_whitespace_1, tc)
+{
+       libhttp_test_parser("Fo o: bar\r\n", 0);
+}

 ATF_TP_ADD_TCS(tp)
 {
@@ -194,6 +203,7 @@
        ATF_TP_ADD_TC(tp, libhttp_parse_4);
        ATF_TP_ADD_TC(tp, libhttp_parse_content_length_1);
        ATF_TP_ADD_TC(tp, libhttp_parse_content_length_2);
+       ATF_TP_ADD_TC(tp, libhttp_parser_other_whitespace_1);
        return atf_no_error();
 }

--
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.

Reply via email to