--- parser3/src/targets/apache13/modules/extra/Attic/mod_parser3.C 2001/03/22 15:30:46 1.10 +++ parser3/src/targets/apache13/modules/extra/Attic/mod_parser3.C 2001/03/23 08:47:48 1.13 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: mod_parser3.C,v 1.10 2001/03/22 15:30:46 paf Exp $ + $Id: mod_parser3.C,v 1.13 2001/03/23 08:47:48 paf Exp $ */ #include "httpd.h" @@ -500,7 +500,11 @@ Service_funcs service_funcs={ send_body }; -/// main workhorse +/** + main workhorse + + @todo intelligent cache-control +*/ static int parser_handler(request_rec *r) { Pool pool; @@ -566,18 +570,17 @@ static int parser_handler(request_rec *r int content_length=strlen(body); // prepare header - (*service_funcs.add_header_attribute)(pool, "content-type", "text/plain"); + add_header_attribute(pool, "content-type", "text/plain"); char content_length_cstr[MAX_NUMBER]; - snprintf(content_length_cstr, MAX_NUMBER, "%d", content_length); - (*service_funcs.add_header_attribute)(pool, "content-length", - content_length_cstr); + snprintf(content_length_cstr, MAX_NUMBER, "%lu", content_length); + add_header_attribute(pool, "content-length", content_length_cstr); // send header - (*service_funcs.send_header)(pool); + send_header(pool); // send body if(!r->header_only) - (*service_funcs.send_body)(pool, body, content_length); + send_body(pool, body, content_length); // unsuccessful finish }