--- parser3/src/main/pa_request.C 2002/08/06 07:59:36 1.221 +++ parser3/src/main/pa_request.C 2002/08/12 14:21:52 1.224 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_REQUEST_C="$Date: 2002/08/06 07:59:36 $"; +static const char* IDENT_REQUEST_C="$Date: 2002/08/12 14:21:52 $"; #include "pa_sapi.h" #include "pa_common.h" @@ -101,11 +101,11 @@ Request::Request(Pool& apool, /// bases used // form class - classes().put(form.get_class()->base()->name(), &form); + classes().put(form.get_class()->base_class()->name(), &form); // mail class - classes().put(mail.get_class()->base()->name(), &mail); + classes().put(mail.get_class()->base_class()->name(), &mail); // math class - classes().put(math.get_class()->base()->name(), &math); + classes().put(math.get_class()->base_class()->name(), &math); } Request::~Request() { @@ -553,10 +553,10 @@ void Request::output_result(const VFile& // header: cookies cookie.output_result(); - VString *body_file_content_type; + Value *body_file_content_type; // set content-type - if(body_file_content_type=static_cast( - body_file.fields().get(*vfile_mime_type_name))) { + if(body_file_content_type=static_cast( + body_file.fields().get(*content_type_name))) { // body file content type response.fields().put(*content_type_name, body_file_content_type); } else { @@ -580,6 +580,9 @@ void Request::output_result(const VFile& const void *client_body; size_t client_content_length; // transcode text body when "text/*" or simple result + if(body_file_content_type) + if(Hash *hash=body_file_content_type->get_hash(0)) + body_file_content_type=static_cast(hash->get(*value_name)); if(!body_file_content_type/*vstring.as_vfile*/ || body_file_content_type->as_string().pos("text/")==0) { Charset::transcode(pool(), pool().get_source_charset(), body_file.value_ptr(), body_file.value_size(),