diff src/c/urweb.c @ 466:1626dcba13ee

Cookies work across pages
author Adam Chlipala <adamc@hcoop.net>
date Thu, 06 Nov 2008 14:03:50 -0500
parents 91914c15a85b
children 3f1b9231a37b
line wrap: on
line diff
--- a/src/c/urweb.c	Thu Nov 06 12:46:45 2008 -0500
+++ b/src/c/urweb.c	Thu Nov 06 14:03:50 2008 -0500
@@ -1152,11 +1152,13 @@
   }
 }
 
-uw_unit uw_Basis_set_cookie(uw_context ctx, uw_Basis_string c, uw_Basis_string v) {
+uw_unit uw_Basis_set_cookie(uw_context ctx, uw_Basis_string prefix, uw_Basis_string c, uw_Basis_string v) {
   uw_write_header(ctx, "Set-Cookie: ");
   uw_write_header(ctx, c);
   uw_write_header(ctx, "=");
   uw_write_header(ctx, v);
+  uw_write_header(ctx, "; path=");
+  uw_write_header(ctx, prefix);
   uw_write_header(ctx, "\r\n");
 
   return uw_unit_v;