--- parser3/src/main/pa_http.C 2008/07/23 14:08:26 1.17 +++ parser3/src/main/pa_http.C 2009/01/12 07:16:33 1.19 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_HTTP_C="$Date: 2008/07/23 14:08:26 $"; +static const char * const IDENT_HTTP_C="$Date: 2009/01/12 07:16:33 $"; #include "pa_http.h" #include "pa_common.h" @@ -14,13 +14,14 @@ static const char * const IDENT_HTTP_C=" // defines -#define HTTP_METHOD_NAME "method" -#define HTTP_FORM_NAME "form" -#define HTTP_BODY_NAME "body" -#define HTTP_TIMEOUT_NAME "timeout" -#define HTTP_HEADERS_NAME "headers" -#define HTTP_COOKIES_NAME "cookies" -#define HTTP_ANY_STATUS_NAME "any-status" +#define HTTP_METHOD_NAME "method" +#define HTTP_FORM_NAME "form" +#define HTTP_BODY_NAME "body" +#define HTTP_TIMEOUT_NAME "timeout" +#define HTTP_HEADERS_NAME "headers" +#define HTTP_COOKIES_NAME "cookies" + +#define HTTP_ANY_STATUS_NAME "any-status" #define HTTP_OMIT_POST_CHARSET "omit-post-charset" // ^file::load[...;http://...;$.form[...]$.method[post]] // by default add charset to content-type @@ -364,7 +365,7 @@ static void form_value2string( Form_table_value2string_info info(key, *result); tvalue->for_each(form_table_value2string, &info); } else - throw Exception(0, + throw Exception(PARSER_RUNTIME, new String(key, String::L_TAINTED), "is %s, "HTTP_FORM_NAME" option value must either string or table", value->type()); } @@ -495,7 +496,7 @@ File_read_http_result pa_internal_file_r const char* current=connect_string_cstr; if(strncmp(current, "http://", 7)!=0) - throw Exception(0, + throw Exception(PARSER_RUNTIME, &connect_string, "does not start with http://"); //never current+=7;