--- parser3/src/targets/apache13/modules/extra/Attic/mod_parser3.C 2001/07/18 10:06:04 1.36 +++ parser3/src/targets/apache13/modules/extra/Attic/mod_parser3.C 2001/08/10 08:58:56 1.41 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) */ -static const char *RCSId="$Id: mod_parser3.C,v 1.36 2001/07/18 10:06:04 parser Exp $"; +static const char *RCSId="$Id: mod_parser3.C,v 1.41 2001/08/10 08:58:56 parser Exp $"; #include "httpd.h" #include "http_config.h" @@ -14,6 +14,7 @@ static const char *RCSId="$Id: mod_parse #include "http_main.h" #include "http_protocol.h" #include "util_script.h" +#include "multithread.h" #include "pa_sapi.h" #include "classes.h" @@ -136,6 +137,9 @@ size_t SAPI::read_post(Pool& pool, char void SAPI::add_header_attribute(Pool& pool, const char *key, const char *value) { request_rec *r=static_cast(pool.context()); + if(strcasecmp(key, "location")==0) + r->status=302; + if(strcasecmp(key, "content-type")==0) { /* r->content_type, *not* r->headers_out("Content-type"). If you don't * set it, it will be filled in with the server's default type (typically @@ -143,8 +147,10 @@ void SAPI::add_header_attribute(Pool& po * case. */ r->content_type = value; - } else - ap_table_merge(r->headers_out, key, value); + } else if(strcasecmp(key, "status")==0) + r->status=atoi(value); + else + ap_table_addn(r->headers_out, key, value); } void SAPI::send_header(Pool& pool) { @@ -170,8 +176,11 @@ void SAPI::send_body(Pool& pool, const v @todo intelligent cache-control */ -static int parser_handler(request_rec *r) -{ +static int parser_handler(request_rec *r) { +// _asm int 3; + if(r->finfo.st_mode == 0) + return NOT_FOUND; + Pool pool(r->pool); pool.set_context(r); @@ -289,7 +298,7 @@ static int parser_handler(request_rec *r */ static void setup_module_cells() { - static bool globals_inited=false; + static bool globals_inited=false; if(globals_inited) return; globals_inited=true;