X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_api.c;h=a8257faf5f1f3a2fc02e0f4ef189d998b112169e;hb=1bb903f3aad484c7adf638af3365cb7c668d3281;hp=db8f46c0097d0432408ba17d52ee500755736bbd;hpb=98d8a1dced6ae8bde1953f439de7fd9c453e5971;p=m6w6%2Fext-http diff --git a/http_api.c b/http_api.c index db8f46c..a8257fa 100644 --- a/http_api.c +++ b/http_api.c @@ -145,7 +145,7 @@ static void http_ob_blackhole(char *output, uint output_len, char **handled_outp STATUS _http_exit_ex(int status, char *header, char *body, zend_bool send_header TSRMLS_DC) { if ( (send_header && (SUCCESS != http_send_status_header(status, header))) || - (!send_header && status && (SUCCESS != http_send_status(status)))) { + (status && (SUCCESS != http_send_status(status)))) { http_error_ex(HE_WARNING, HTTP_E_HEADER, "Failed to exit with status/header: %d - %s", status, header ? header : ""); STR_FREE(header); STR_FREE(body); @@ -166,6 +166,7 @@ STATUS _http_exit_ex(int status, char *header, char *body, zend_bool send_header case 305: http_log(HTTP_G->log.redirect, "305-REDIRECT", header); break; case 307: http_log(HTTP_G->log.redirect, "307-REDIRECT", header); break; case 304: http_log(HTTP_G->log.cache, "304-CACHE", header); break; + case 404: http_log(HTTP_G->log.not_found, "404-NOTFOUND", NULL); break; case 405: http_log(HTTP_G->log.allowed_methods, "405-ALLOWED", header); break; default: http_log(NULL, header, body); break; }