httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r744267 - /httpd/apreq/trunk/library/t/cookie.c
Date Fri, 13 Feb 2009 22:32:17 GMT
Author: joes
Date: Fri Feb 13 22:32:16 2009
New Revision: 744267

URL: http://svn.apache.org/viewvc?rev=744267&view=rev
Log:
add wordpress cookie test

Modified:
    httpd/apreq/trunk/library/t/cookie.c

Modified: httpd/apreq/trunk/library/t/cookie.c
URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/library/t/cookie.c?rev=744267&r1=744266&r2=744267&view=diff
==============================================================================
--- httpd/apreq/trunk/library/t/cookie.c (original)
+++ httpd/apreq/trunk/library/t/cookie.c Fri Feb 13 22:32:16 2009
@@ -30,7 +30,10 @@
 static const char rfccookies[] = "$Version=1; first=a;$domain=quux;second=be,"
                                  "$Version=1;third=cie";
 
-static apr_table_t *jar, *jar2;
+static const char wpcookies[] = "dbx-postmeta=grabit=0-,1-,2-,3-,4-,5-,6-"
+                                "&advancedstuff=0-,1+,2-";
+
+static apr_table_t *jar, *jar2, *jar3;
 static apr_pool_t *p;
 
 static void jar_make(dAT)
@@ -41,6 +44,9 @@
     jar2 = apr_table_make(p, APREQ_DEFAULT_NELTS);
     AT_not_null(jar2);
     AT_int_eq(apreq_parse_cookie_header(p, jar2, rfccookies), APR_SUCCESS);
+    jar3 = apr_table_make(p, APREQ_DEFAULT_NELTS);
+    AT_not_null(jar3);
+    AT_int_eq(apreq_parse_cookie_header(p, jar3, wpcookies), APREQ_ERROR_NOTOKEN);
 }
 
 static void jar_get_rfc(dAT)
@@ -167,7 +173,7 @@
     unsigned i, plan = 0;
     dAT;
     at_test_t test_list [] = {
-        { dT(jar_make, 4) },
+        { dT(jar_make, 6) },
         { dT(jar_get_rfc, 6), "1 3 5" },
         { dT(jar_get_ns, 10) },
         { dT(netscape_cookie, 7) },



Mime
View raw message