added support for UTF-8

now the UTF-8 is a default charset


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@677 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-11-21 00:19:17 +00:00
parent f1f0fa34cb
commit 8e72a820dd
153 changed files with 4270 additions and 2784 deletions

View File

@@ -18,7 +18,7 @@
#include "item.h"
#include "error.h"
#include "config.h"
#include "textstream.h"
class FunctionBase;
@@ -43,7 +43,9 @@ struct Request
enum Role { responder, authorizer } role;
// headers, page and debug
std::ostringstream headers, page, debug;
//std::ostringstream headers, page, debug;
TextStream<std::string> headers;
TextStream<std::wstring> page, debug;
// raw parameters
GetTab get_tab;
@@ -99,10 +101,11 @@ struct Request
std::vector<Item> item_tab;
// if not empty means an address for redirecting to
std::string redirect_to;
std::wstring redirect_to;
std::string aredirect_to;
// send header X-LIGHTTPD-send-file with path to a file
std::string x_sendfile;
std::wstring x_sendfile;
// send as attachment (causing header: content-disposition: attachment)
bool send_as_attachment;
@@ -120,16 +123,17 @@ struct Request
void PrintEnv();
bool IsParam(const char * param_name);
const std::string & ParamValue(const char * param_name); // returns empty string if there is no such a parameter
bool IsParam(const wchar_t * param_name);
bool IsParam(const std::wstring & param_name);
const std::wstring & ParamValue(const wchar_t * param_name); // returns empty string if there is no such a parameter
void SetCookie(const char * name, const char * value, tm * expires = 0);
void SetCookie(const char * name, long value, tm * expires = 0);
bool IsPostVar(const char * var);
const std::string & PostVar(const char * var); // !! zamienic na referencje nie do sta<74>ej (bez const)
bool PostVar(const char * var, std::string & result);
std::string * PostVarp(const char * var);
bool IsPostVar(const wchar_t * var);
const std::wstring & PostVar(const wchar_t * var); // !! zamienic na referencje nie do sta<74>ej (bez const)
bool PostVar(const wchar_t * var, std::wstring & result);
std::wstring * PostVarp(const wchar_t * var);
bool AllPostVarEmpty(); // returning true if all post vars are empty
@@ -147,7 +151,7 @@ private:
const char char_empty;
// used in ParamValue() and PostVar() when there is no such a param
const std::string str_empty;
const std::wstring str_empty;
};