comparison src/http/ngx_http_script.c @ 394:34fb3a573548 NGINX_0_7_8

nginx 0.7.8 *) Feature: the ngx_http_xslt_module. *) Feature: the "$arg_..." variables. *) Feature: Solaris directio support. Thanks to Ivan Debnar. *) Bugfix: now if FastCGI server sends a "Location" header line without status line, then nginx uses 302 status code. Thanks to Maxim Dounin.
author Igor Sysoev <http://sysoev.ru>
date Mon, 04 Aug 2008 00:00:00 +0400
parents 0b6053502c55
children a094317ba307
comparison
equal deleted inserted replaced
393:4ec606a899d3 394:34fb3a573548
1014 1014
1015 case ngx_http_script_file_plain: 1015 case ngx_http_script_file_plain:
1016 case ngx_http_script_file_dir: 1016 case ngx_http_script_file_dir:
1017 case ngx_http_script_file_exists: 1017 case ngx_http_script_file_exists:
1018 case ngx_http_script_file_exec: 1018 case ngx_http_script_file_exec:
1019 goto false; 1019 goto false_value;
1020 1020
1021 case ngx_http_script_file_not_plain: 1021 case ngx_http_script_file_not_plain:
1022 case ngx_http_script_file_not_dir: 1022 case ngx_http_script_file_not_dir:
1023 case ngx_http_script_file_not_exists: 1023 case ngx_http_script_file_not_exists:
1024 case ngx_http_script_file_not_exec: 1024 case ngx_http_script_file_not_exec:
1025 goto true; 1025 goto true_value;
1026 } 1026 }
1027 1027
1028 goto false; 1028 goto false_value;
1029 } 1029 }
1030 1030
1031 switch (code->op) { 1031 switch (code->op) {
1032 case ngx_http_script_file_plain: 1032 case ngx_http_script_file_plain:
1033 if (of.is_file) { 1033 if (of.is_file) {
1034 goto true; 1034 goto true_value;
1035 } 1035 }
1036 goto false; 1036 goto false_value;
1037 1037
1038 case ngx_http_script_file_not_plain: 1038 case ngx_http_script_file_not_plain:
1039 if (of.is_file) { 1039 if (of.is_file) {
1040 goto false; 1040 goto false_value;
1041 } 1041 }
1042 goto true; 1042 goto true_value;
1043 1043
1044 case ngx_http_script_file_dir: 1044 case ngx_http_script_file_dir:
1045 if (of.is_dir) { 1045 if (of.is_dir) {
1046 goto true; 1046 goto true_value;
1047 } 1047 }
1048 goto false; 1048 goto false_value;
1049 1049
1050 case ngx_http_script_file_not_dir: 1050 case ngx_http_script_file_not_dir:
1051 if (of.is_dir) { 1051 if (of.is_dir) {
1052 goto false; 1052 goto false_value;
1053 } 1053 }
1054 goto true; 1054 goto true_value;
1055 1055
1056 case ngx_http_script_file_exists: 1056 case ngx_http_script_file_exists:
1057 if (of.is_file || of.is_dir || of.is_link) { 1057 if (of.is_file || of.is_dir || of.is_link) {
1058 goto true; 1058 goto true_value;
1059 } 1059 }
1060 goto false; 1060 goto false_value;
1061 1061
1062 case ngx_http_script_file_not_exists: 1062 case ngx_http_script_file_not_exists:
1063 if (of.is_file || of.is_dir || of.is_link) { 1063 if (of.is_file || of.is_dir || of.is_link) {
1064 goto false; 1064 goto false_value;
1065 } 1065 }
1066 goto true; 1066 goto true_value;
1067 1067
1068 case ngx_http_script_file_exec: 1068 case ngx_http_script_file_exec:
1069 if (of.is_exec) { 1069 if (of.is_exec) {
1070 goto true; 1070 goto true_value;
1071 } 1071 }
1072 goto false; 1072 goto false_value;
1073 1073
1074 case ngx_http_script_file_not_exec: 1074 case ngx_http_script_file_not_exec:
1075 if (of.is_exec) { 1075 if (of.is_exec) {
1076 goto false; 1076 goto false_value;
1077 } 1077 }
1078 goto true; 1078 goto true_value;
1079 } 1079 }
1080 1080
1081 false: 1081 false_value:
1082 1082
1083 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 1083 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
1084 "http script file op false"); 1084 "http script file op false");
1085 1085
1086 *value = ngx_http_variable_null_value; 1086 *value = ngx_http_variable_null_value;
1087 return; 1087 return;
1088 1088
1089 true: 1089 true_value:
1090 1090
1091 *value = ngx_http_variable_true_value; 1091 *value = ngx_http_variable_true_value;
1092 return; 1092 return;
1093 } 1093 }
1094 1094