--- parser3/src/targets/cgi/parser3.C 2001/04/07 14:23:39 1.57 +++ parser3/src/targets/cgi/parser3.C 2001/04/09 09:48:26 1.59 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: parser3.C,v 1.57 2001/04/07 14:23:39 paf Exp $ + $Id: parser3.C,v 1.59 2001/04/09 09:48:26 paf Exp $ */ #include "pa_config_includes.h" @@ -25,6 +25,7 @@ #include "pa_globals.h" #include "pa_request.h" #include "pa_socks.h" +#include "pa_exec.h" /// IIS refuses to read bigger chunks const size_t READ_POST_CHUNK_SIZE=0x400*0x400; // 1M @@ -58,8 +59,8 @@ const char *SAPI::get_env(Pool& pool, co return getenv(name); } -uint SAPI::read_post(Pool& pool, char *buf, uint max_bytes) { - uint read_size=0; +size_t SAPI::read_post(Pool& pool, char *buf, size_t max_bytes) { + size_t read_size=0; do { int chunk_size=read(fileno(stdin), buf+read_size, min(READ_POST_CHUNK_SIZE, max_bytes-read_size)); @@ -123,6 +124,13 @@ void SAPI::log(Pool& pool, const char *f fclose(f); } +int SAPI::execute(const String& file_spec, + const Hash *env, + const Array *argv, + const String& in, String& out, String& err) { + return pa_exec(file_spec, env, argv, in, out, err); +} + /** main workhorse