--- parser3/src/main/pa_http.C 2013/04/21 20:37:55 1.58 +++ parser3/src/main/pa_http.C 2014/04/15 22:20:43 1.61 @@ -13,7 +13,13 @@ #include "pa_vfile.h" #include "pa_random.h" -volatile const char * IDENT_PA_HTTP_C="$Id: pa_http.C,v 1.58 2013/04/21 20:37:55 moko Exp $" IDENT_PA_HTTP_H; +volatile const char * IDENT_PA_HTTP_C="$Id: pa_http.C,v 1.61 2014/04/15 22:20:43 moko Exp $" IDENT_PA_HTTP_H; + +#ifdef _MSC_VER +#include +#else +#define closesocket close +#endif // defines @@ -24,8 +30,7 @@ volatile const char * IDENT_PA_HTTP_C="$ #define HTTP_HEADERS_NAME "headers" #define HTTP_FORM_ENCTYPE_NAME "enctype" #define HTTP_ANY_STATUS_NAME "any-status" -#define HTTP_OMIT_POST_CHARSET_NAME "omit-post-charset" // ^file::load[...;http://...;$.form[...]$.method[post]] - // by default add charset to content-type +#define HTTP_OMIT_POST_CHARSET_NAME "omit-post-charset" // ^file::load[...;http://...;$.method[post]] by default adds charset to content-type #define HTTP_TABLES_NAME "tables" @@ -34,9 +39,9 @@ volatile const char * IDENT_PA_HTTP_C="$ #define DEFAULT_USER_AGENT "parser3" -# ifndef INADDR_NONE -# define INADDR_NONE ((ulong) -1) -# endif +#ifndef INADDR_NONE +#define INADDR_NONE ((ulong) -1) +#endif #undef CRLF #define CRLF "\r\n" @@ -684,6 +689,7 @@ File_read_http_result pa_internal_file_r asked_remote_charset=&charsets.get(vcharset_name->as_string().change_case(r.charsets.source(), String::CC_UPPER)); } if(Value* vresponse_charset_name=options->get(PA_RESPONSE_CHARSET_NAME)) { + valid_options++; real_remote_charset=&charsets.get(vresponse_charset_name->as_string().change_case(r.charsets.source(), String::CC_UPPER)); } if(Value* vuser=options->get(HTTP_USER)) {