* library/t/parsers.c: Remove the test case for invalid input (name="")
  which is now rejected by the parser with an error.


git-svn-id: https://svn.apache.org/repos/asf/httpd/apreq/trunk@1903489 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/library/t/parsers.c b/library/t/parsers.c
index f8449d1..1ff950f 100644
--- a/library/t/parsers.c
+++ b/library/t/parsers.c
@@ -39,13 +39,20 @@
 "content-disposition: form-data; name=\"pics\"; filename=\"file1.txt\"" CRLF
 "Content-Type: text/plain" CRLF CRLF
 "... contents of file1.txt ..." CRLF CRLF
-"--AaB03x" CRLF
+"--AaB03x--" CRLF;
+
+/* This (invalid) case used to segfault the parser before r164254 so should
+   be tested separately to form_data:
+   
+static char form_data_fail[] =
 "content-disposition: form-data; name=\"\"" CRLF
 "content-type: text/plain;" CRLF " charset=windows-1250" CRLF
 "content-transfer-encoding: quoted-printable" CRLF CRLF
 "Joe owes =80100." CRLF
 "--AaB03x--" CRLF;
 
+*/
+
 static char xml_data[] =
 "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"
 "<methodCall>"
@@ -228,7 +235,7 @@
             AT_int_eq(rv, (j < strlen(form_data)) ? APR_INCOMPLETE : APR_SUCCESS);
             rv = apreq_parser_run(parser, body, tail);
             AT_int_eq(rv, APR_SUCCESS);
-            AT_int_eq(apr_table_elts(body)->nelts, 3);
+            AT_int_eq(apr_table_elts(body)->nelts, 2);
 
             val = apr_table_get(body,"field1");
             AT_str_eq(val, "Joe owes =80100.");
@@ -246,14 +253,6 @@
             val = apr_table_get(t, "content-type");
             AT_str_eq(val, "text/plain");
 
-            val = apr_table_get(body, "");
-            AT_str_eq(val, "Joe owes =80100.");
-            t = apreq_value_to_param(val)->info;
-            val = apr_table_get(t, "content-type");
-            AT_int_eq(apreq_header_attribute(val, "charset", 7, &val, &len),
-                      APR_SUCCESS);
-            AT_str_eq(val, "windows-1250");
-
             apr_brigade_cleanup(vb);
             apr_brigade_cleanup(bb);
         }