--- parser3/src/classes/file.C 2001/07/18 16:11:11 1.41 +++ parser3/src/classes/file.C 2001/07/20 09:40:46 1.44 @@ -5,9 +5,9 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: file.C,v 1.41 2001/07/18 16:11:11 parser Exp $ + $Id: file.C,v 1.44 2001/07/20 09:40:46 parser Exp $ */ -static const char *RCSId="$Id: file.C,v 1.41 2001/07/18 16:11:11 parser Exp $"; +static const char *RCSId="$Id: file.C,v 1.44 2001/07/20 09:40:46 parser Exp $"; #include "classes.h" #include "pa_request.h" @@ -210,7 +210,7 @@ static void _exec_cgi(Request& r, const //out.APPEND_CONST("content-type:text/plain\nheader:test-header\n\ntest-body"); //out<(r.self); @@ -229,7 +229,7 @@ static void _exec_cgi(Request& r, const PTHROW(0, 0, &method_name, "output does not contain CGI header; exit code=%d; size=%u; text: \"%s\"", - exit_code, (uint)out.size(), out.cstr()); + status, (uint)out.size(), out.cstr()); } const String& header=out.mid(0, pos); @@ -245,10 +245,10 @@ static void _exec_cgi(Request& r, const // body self.set(false/*not tainted*/, body->cstr(String::UL_AS_IS), body->size()); - // $exit-code + // $status self.fields().put( - *new(pool) String(pool, "exit-code"), - new(pool) VInt(pool, exit_code)); + *new(pool) String(pool, "status"), + new(pool) VInt(pool, status)); // $stderr if(err.size()) { @@ -256,7 +256,7 @@ static void _exec_cgi(Request& r, const *new(pool) String(pool, "stderr"), new(pool) VString(err)); - SAPI::log(pool, "file:cgi: %s", err.cstr()); + SAPI::log(pool, "file:%s: %s", cgi?"cgi":"exec", err.cstr()); } } static void _exec(Request& r, const String& method_name, MethodParams *params) {