Mercurial > urweb
comparison src/c/driver.c @ 462:21bb5bbba2e9
Setting a cookie
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 06 Nov 2008 11:29:16 -0500 |
parents | 8f65b0fa3b29 |
children | 91914c15a85b |
comparison
equal
deleted
inserted
replaced
461:5c9606deacb6 | 462:21bb5bbba2e9 |
---|---|
204 | 204 |
205 break; | 205 break; |
206 } | 206 } |
207 } | 207 } |
208 | 208 |
209 uw_write(ctx, "HTTP/1.1 200 OK\r\n"); | 209 uw_write_header(ctx, "HTTP/1.1 200 OK\r\n"); |
210 uw_write(ctx, "Content-type: text/html\r\n\r\n"); | 210 uw_write_header(ctx, "Content-type: text/html\r\n"); |
211 uw_write(ctx, "<html>"); | |
212 | 211 |
213 strcpy(path_copy, path); | 212 strcpy(path_copy, path); |
214 fk = uw_begin(ctx, path_copy); | 213 fk = uw_begin(ctx, path_copy); |
215 if (fk == SUCCESS) { | 214 if (fk == SUCCESS) { |
216 uw_write(ctx, "</html>"); | |
217 | |
218 if (uw_db_commit(ctx)) { | 215 if (uw_db_commit(ctx)) { |
219 fk = FATAL; | 216 fk = FATAL; |
220 | 217 |
221 printf("Error running SQL COMMIT\n"); | 218 printf("Error running SQL COMMIT\n"); |
222 uw_reset(ctx); | 219 uw_reset(ctx); |