comparison src/http/ngx_http_script.c @ 669:562806624c4a release-0.3.56

nginx-0.3.56-RELEASE import *) 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 a request returned a redirect and some sent to client header lines were logged in the access log.
author Igor Sysoev <igor@sysoev.ru>
date Fri, 04 Aug 2006 16:04:04 +0000
parents 4c8cd5ae5cc1
children cec32b3753ac
comparison
equal deleted inserted replaced
668:9a9d671aa343 669:562806624c4a
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,