comparison src/http/ngx_http_script.c @ 218:1bf60f8c5c9e NGINX_0_3_56

nginx 0.3.56 *) Feature: the "dav_access" directive. *) Feature: the "if" directive supports the "-d", "!-d", "-e", "!-e", "-x", and "!-x" operators. *) Bugfix: a segmentation fault occurred if an request returned an redirect and some sent to client header lines were logged in the access log.
author Igor Sysoev <http://sysoev.ru>
date Fri, 04 Aug 2006 00:00:00 +0400
parents 2a97b47ff8db
children 559bc7ec214e
comparison
equal deleted inserted replaced
217:a346c23fc94e 218:1bf60f8c5c9e
959 ngx_file_info_n " \"%s\" failed", value->data); 959 ngx_file_info_n " \"%s\" failed", value->data);
960 } 960 }
961 961
962 switch (code->op) { 962 switch (code->op) {
963 case ngx_http_script_file_plain: 963 case ngx_http_script_file_plain:
964 case ngx_http_script_file_dir:
965 case ngx_http_script_file_exists:
966 case ngx_http_script_file_exec:
964 goto false; 967 goto false;
965 case ngx_http_script_file_not_plain: 968 case ngx_http_script_file_not_plain:
969 case ngx_http_script_file_not_dir:
970 case ngx_http_script_file_not_exec:
966 goto true; 971 goto true;
967 } 972 }
968 973
969 goto false; 974 goto false;
970 } 975 }
979 case ngx_http_script_file_not_plain: 984 case ngx_http_script_file_not_plain:
980 if (ngx_is_file(&fi)) { 985 if (ngx_is_file(&fi)) {
981 goto false; 986 goto false;
982 } 987 }
983 goto true; 988 goto true;
989
990 case ngx_http_script_file_dir:
991 if (ngx_is_dir(&fi)) {
992 goto true;
993 }
994 goto false;
995
996 case ngx_http_script_file_not_dir:
997 if (ngx_is_dir(&fi)) {
998 goto false;
999 }
1000 goto true;
1001
1002 case ngx_http_script_file_exists:
1003 if (ngx_is_file(&fi) || ngx_is_dir(&fi) || ngx_is_link(&fi)) {
1004 goto true;
1005 }
1006 goto false;
1007
1008 case ngx_http_script_file_not_exists:
1009 if (ngx_is_file(&fi) || ngx_is_dir(&fi) || ngx_is_link(&fi)) {
1010 goto false;
1011 }
1012 goto true;
1013
1014 #if (NGX_WIN32)
1015
1016 case ngx_http_script_file_exec:
1017 goto false;
1018
1019 case ngx_http_script_file_not_exec:
1020 goto true;
1021
1022 #else
1023
1024 case ngx_http_script_file_exec:
1025 if (ngx_is_exec(&fi)) {
1026 goto true;
1027 }
1028 goto false;
1029
1030 case ngx_http_script_file_not_exec:
1031 if (ngx_is_exec(&fi)) {
1032 goto false;
1033 }
1034 goto true;
1035
1036 #endif
984 } 1037 }
985 1038
986 false: 1039 false:
987 1040
988 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, e->request->connection->log, 0, 1041 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, e->request->connection->log, 0,