comparison 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
comparison
equal deleted inserted replaced
465:ddd363e856ff 466:1626dcba13ee
1150 return NULL; 1150 return NULL;
1151 } 1151 }
1152 } 1152 }
1153 } 1153 }
1154 1154
1155 uw_unit uw_Basis_set_cookie(uw_context ctx, uw_Basis_string c, uw_Basis_string v) { 1155 uw_unit uw_Basis_set_cookie(uw_context ctx, uw_Basis_string prefix, uw_Basis_string c, uw_Basis_string v) {
1156 uw_write_header(ctx, "Set-Cookie: "); 1156 uw_write_header(ctx, "Set-Cookie: ");
1157 uw_write_header(ctx, c); 1157 uw_write_header(ctx, c);
1158 uw_write_header(ctx, "="); 1158 uw_write_header(ctx, "=");
1159 uw_write_header(ctx, v); 1159 uw_write_header(ctx, v);
1160 uw_write_header(ctx, "; path=");
1161 uw_write_header(ctx, prefix);
1160 uw_write_header(ctx, "\r\n"); 1162 uw_write_header(ctx, "\r\n");
1161 1163
1162 return uw_unit_v; 1164 return uw_unit_v;
1163 } 1165 }