|
|
| version 1.190, 2009/05/14 08:10:09 | version 1.191, 2009/05/15 23:35:06 |
|---|---|
| Line 616 static void _cgi(Request& r, MethodParam | Line 616 static void _cgi(Request& r, MethodParam |
| static void _list(Request& r, MethodParams& params) { | static void _list(Request& r, MethodParams& params) { |
| Value& relative_path=params.as_no_junction(0, "path must not be code"); | Value& relative_path=params.as_no_junction(0, "path must not be code"); |
| VRegex* vregex; | VRegex* vregex=0; |
| VRegexCleaner vrcleaner; | VRegexCleaner vrcleaner; |
| if(params.count()>1){ | if(params.count()>1){ |
| Value& regexp=params.as_no_junction(1, "regexp must not be code"); | Value& regexp=params.as_no_junction(1, "regexp must not be code"); |
| if(Value* value=regexp.as(VREGEX_TYPE, false)){ | if(regexp.is_defined()){ |
| vregex=static_cast<VRegex*>(value); | if(Value* value=regexp.as(VREGEX_TYPE, false)){ |
| } else { | vregex=static_cast<VRegex*>(value); |
| vregex=new VRegex(r.charsets.source(), ®exp.as_string(), 0/*options*/); | } else { |
| vregex->study(); | vregex=new VRegex(r.charsets.source(), ®exp.as_string(), 0/*options*/); |
| vrcleaner.vregex=vregex; | vregex->study(); |
| vrcleaner.vregex=vregex; | |
| } | |
| } | } |
| } else { | |
| vregex=0; | |
| } | } |
| const char* absolute_path_cstr=r.absolute(relative_path.as_string()).cstr(String::L_FILE_SPEC); | const char* absolute_path_cstr=r.absolute(relative_path.as_string()).cstr(String::L_FILE_SPEC); |