--- parser3/src/targets/cgi/parser3.C 2002/05/06 10:53:53 1.178 +++ parser3/src/targets/cgi/parser3.C 2002/06/11 12:20:42 1.180 @@ -4,7 +4,7 @@ Copyright(c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - $Id: parser3.C,v 1.178 2002/05/06 10:53:53 paf Exp $ + $Id: parser3.C,v 1.180 2002/06/11 12:20:42 paf Exp $ */ #include "pa_config_includes.h" @@ -165,6 +165,16 @@ const char *SAPI::get_env(Pool& , const return getenv(name); } +const char *const *SAPI::environment(Pool&) { +#ifdef _MSC_VER + extern char **_environ; + return _environ; +#else + extern char **environ; + return environ; +#endif +} + size_t SAPI::read_post(Pool& , char *buf, size_t max_bytes) { size_t read_size=0; do { @@ -278,10 +288,10 @@ void real_parser_handler( request_info.uri=reconstructed_uri; } else request_info.uri=path_info; - else - throw Exception("parser.runtime", - 0, - "CGI: no PATH_INFO defined(in reinventing REQUEST_URI)"); + else + throw Exception("parser.runtime", + 0, + "CGI: no PATH_INFO defined(in reinventing REQUEST_URI)"); #ifndef WIN32 // they've changed this under IIS5. @@ -300,7 +310,6 @@ void real_parser_handler( const char *content_length=SAPI::get_env(*pool, "CONTENT_LENGTH"); request_info.content_length=(content_length?atoi(content_length):0); request_info.cookie=SAPI::get_env(*pool, "HTTP_COOKIE"); - request_info.user_agent=SAPI::get_env(*pool, "HTTP_USER_AGENT"); // prepare to process request Request request(*pool,