mirror of
https://github.com/php/php-src.git
synced 2025-01-11 05:24:49 +08:00
Return HTTP 403 in case of "access denied".
This commit is contained in:
parent
50489f7682
commit
69ff1d0e4d
@ -1631,8 +1631,13 @@ consult the installation file that came with this distribution, or visit \n\
|
||||
running from shell (so fp == NULL), then fail.
|
||||
*/
|
||||
if (retval == FAILURE && file_handle.handle.fp == NULL) {
|
||||
SG(sapi_headers).http_response_code = 404;
|
||||
PUTS("No input file specified.\n");
|
||||
if (errno == EACCES) {
|
||||
SG(sapi_headers).http_response_code = 403;
|
||||
PUTS("Access denied.\n");
|
||||
} else {
|
||||
SG(sapi_headers).http_response_code = 404;
|
||||
PUTS("No input file specified.\n");
|
||||
}
|
||||
/* we want to serve more requests if this is fastcgi
|
||||
so cleanup and continue, request shutdown is
|
||||
handled later */
|
||||
|
Loading…
Reference in New Issue
Block a user