--- parser3/src/classes/file.C 2015/09/22 23:49:29 1.237 +++ parser3/src/classes/file.C 2015/10/09 00:17:44 1.239 @@ -25,7 +25,7 @@ #include "pa_vregex.h" #include "pa_version.h" -volatile const char * IDENT_FILE_C="$Id: file.C,v 1.237 2015/09/22 23:49:29 moko Exp $"; +volatile const char * IDENT_FILE_C="$Id: file.C,v 1.239 2015/10/09 00:17:44 moko Exp $"; // defines @@ -469,17 +469,10 @@ static void _exec_cgi(Request& r, Method const String& script_name=r.absolute(params.as_string(param_index++, FILE_NAME_MUST_NOT_BE_CODE)); HashStringString env; - #define ECSTR(name, value_cstr) \ - if(value_cstr) \ - env.put( \ - String::Body(#name), \ - String::Body(*value_cstr?value_cstr:0)); \ + #define ECSTR(name, value_cstr) if(value_cstr) env.put(#name, value_cstr); // passing environment for(SAPI::Env::Iterator i(r.sapi_info); i; i.next() ) - env.put( - i.key(), - i.value() - ); + env.put(i.key(), i.value() ); // const ECSTR(GATEWAY_INTERFACE, "CGI/1.1"); @@ -1031,10 +1024,8 @@ static void _sql(Request& r, MethodParam handlers, statement_string); - if(!handlers.value) - throw Exception(PARSER_RUNTIME, - 0, - "produced no result"); + if(!handlers.value.str) + throw Exception(PARSER_RUNTIME, 0, "produced no result"); VFile& self=GET_SELF(r, VFile);