--- parser3/src/include/pa_globals.h 2001/03/23 10:14:33 1.22 +++ parser3/src/include/pa_globals.h 2001/03/24 10:59:47 1.24 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_globals.h,v 1.22 2001/03/23 10:14:33 paf Exp $ + $Id: pa_globals.h,v 1.24 2001/03/24 10:59:47 paf Exp $ */ #ifndef PA_GLOBALS_H @@ -19,6 +19,7 @@ #define AUTO_FILE_NAME "auto.p" #define CONTENT_TYPE_NAME "content-type" +#define DEFAULT_CONTENT_TYPE_STRING "text/html" #define BODY_NAME "body" #define VALUE_NAME "value" #define EXPIRES_NAME "expires" @@ -50,33 +51,16 @@ #define RESULT_VAR_NAME "result" //@} -/// target-specific service functions -struct SAPI { - /// get env - const char *(*get_env)(Pool& pool, const char *name); - /// read POST request bytes - uint (*read_post)(Pool& pool, char *buf, uint max_bytes); - /// add response header attribute - void (*add_header_attribute)(Pool& pool, const char *key, const char *value); - /// add response header attribute - void (*send_header)(Pool& pool); - /// output body bytes - void (*send_body)(Pool& pool, const char *buf, size_t size); -}; - - /// core func -void globals_init(Pool& pool); +void pa_globals_init(Pool& pool); /// hex_value[c] = hex value of c extern short hex_value[0x100]; -/// target-specific service functions -extern SAPI sapi; - //@{ /// global string extern String *content_type_name; +extern String *default_content_type_string; extern String *body_name; extern String *value_name; extern String *expires_name;