diff options
Diffstat (limited to 'm2.c')
-rw-r--r-- | m2.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -25,13 +25,14 @@ static void cleanup(void) { static int cb(void *dat, int count, char **data, char **columns) { struct fcgi_env *env = dat; - if (count != 3) { + if (count != 4) { FCGX_FPrintF(env->out, "Status: 500 Internal Server Error\r\n" "Content-type: text/plain\r\n" "\r\n" "The database returned %d columns.\n", count); + return 1; } FCGX_FPrintF(env->out, "Content-type: application/json\r\n" |