--- parser3/src/main/pa_request.C 2001/10/02 11:07:45 1.165 +++ parser3/src/main/pa_request.C 2001/10/18 06:52:05 1.168 @@ -4,10 +4,15 @@ Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_request.C,v 1.165 2001/10/02 11:07:45 parser Exp $ + $Id: pa_request.C,v 1.168 2001/10/18 06:52:05 parser Exp $ */ #include "pa_config_includes.h" + +//#include "pcre.h" +//#include "internal.h" +extern "C" unsigned char pcre_default_tables[]; // pcre/chartables.c + #include "pa_sapi.h" #include "pa_common.h" #include "pa_request.h" @@ -196,13 +201,11 @@ void Request::core( // value must be allocated on request's pool for that pool used on // meaning constructing @see attributed_meaning_to_string default_content_type=defaults?defaults->get_element(*content_type_name):0; -#ifdef XML // record default charset if(default_content_type) if(Hash *hash=default_content_type->get_hash()) if(Value *vcharset=(Value *)hash->get(*charset_name)) pool().set_charset(vcharset->as_string()); -#endif if(Value *element=main_class->get_element(*user_html_name)) if(Table *table=element->get_table()) @@ -320,7 +323,7 @@ void Request::core( const Origin& origin=problem_source->origin(); if(origin.file) { char *buf=(char *)malloc(MAX_STRING); - size_t buf_size=snprintf(buf, MAX_STRING, "%s(%d):", + size_t buf_size=snprintf(buf, MAX_STRING, "%s(%d)", origin.file, 1+origin.line); String *origin_file_line=NEW String(pool(), buf, buf_size, true); @@ -588,5 +591,10 @@ const String& Request::mime_type_of(cons } const unsigned char *Request::pcre_tables() { - return (const unsigned char *)CTYPE.get(pool().get_charset()); + if(unsigned char *result=(unsigned char *)CTYPE.get(pool().get_charset())) + return result; + + // this is not for pcre itself, + // it can do default, it's for string.lower&co + return pcre_default_tables; }