Merge pull request #74 from Douwanna/release/2.4

Update Notes.
This commit is contained in:
FrankLee 2020-05-20 11:36:45 +08:00 committed by GitHub
commit 184ae46225
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 204 additions and 85 deletions

View File

@ -14,6 +14,7 @@ namespace tars
///////////////////////////////////////////////// /////////////////////////////////////////////////
/** /**
* @file tc_cas_queue.h * @file tc_cas_queue.h
* @brief Lock-Free Thread
* @brief 线 * @brief 线
* *
* @author ruanshudong@qq.com * @author ruanshudong@qq.com
@ -21,6 +22,7 @@ namespace tars
///////////////////////////////////////////////// /////////////////////////////////////////////////
/** /**
* @brief Thread Safe Queue
* @brief 线 * @brief 线
*/ */
template<typename T, typename D = deque<T> > template<typename T, typename D = deque<T> >
@ -34,29 +36,36 @@ public:
typedef D queue_type; typedef D queue_type;
/** /**
* @brief , * @brief Getting data from the head without data throwing exception
* @brief ,
* *
* @param t * @param t
* @return bool: true, get data ; false, no data
* @return bool: true, , false, * @return bool: true, , false,
*/ */
T front(); T front();
/** /**
* @brief Get data from the head
* @brief * @brief
* *
* @param t * @param t
* @return bool: true, get data ; false, no data
* @return bool: true, , false, * @return bool: true, , false,
*/ */
bool pop_front(T& t); bool pop_front(T& t);
/** /**
* @brief Get data from the head
* @brief * @brief
* *
* @return bool: true, get data ; false, no data
* @return bool: true, , false, * @return bool: true, , false,
*/ */
bool pop_front(); bool pop_front();
/** /**
* @brief Put data to the back end of the queue.
* @brief . * @brief .
* *
* @param t * @param t
@ -64,6 +73,7 @@ public:
void push_back(const T& t); void push_back(const T& t);
/** /**
* @brief Put data to the back end of the queue.
* @brief . * @brief .
* *
* @param vt * @param vt
@ -71,6 +81,7 @@ public:
void push_back(const queue_type &qt); void push_back(const queue_type &qt);
/** /**
* @brief Put data to the front end of the queue.
* @brief . * @brief .
* *
* @param t * @param t
@ -78,6 +89,7 @@ public:
void push_front(const T& t); void push_front(const T& t);
/** /**
* @brief Put data to the front end of the queue.
* @brief . * @brief .
* *
* @param vt * @param vt
@ -85,29 +97,35 @@ public:
void push_front(const queue_type &qt); void push_front(const queue_type &qt);
/** /**
* @brief Exchange Data
* @brief * @brief
* *
* @param q * @param q
* @return bool: true, data returned ; false, no data returned
* @return true, false * @return true, false
*/ */
bool swap(queue_type &q); bool swap(queue_type &q);
/** /**
* @brief Size of the Queue
* @brief . * @brief .
* *
* @return size_t the size of the queue
* @return size_t * @return size_t
*/ */
size_t size() const; size_t size() const;
/** /**
* @brief Clear Up the Queue
* @brief * @brief
*/ */
void clear(); void clear();
/** /**
* @brief . * @brief .
* * @brief Determine whether the data is null or not.
* @return bool truefalse * @return bool truefalse
* @return bool: true, is null ; false, not null
*/ */
bool empty() const; bool empty() const;
@ -120,15 +138,17 @@ protected:
protected: protected:
/** /**
* *
* Queue
*/ */
queue_type _queue; queue_type _queue;
/** /**
* *
* The length of a queue
*/ */
size_t _size; size_t _size;
//锁 //锁Lock
TC_SpinLock _mutex; TC_SpinLock _mutex;
}; };

View File

@ -29,6 +29,8 @@ namespace tars
/** /**
* @file tc_cgi.h * @file tc_cgi.h
* @brief CGI处理类 * @brief CGI处理类
* @brief CGI Processing Class
*/ */
///////////////////////////////////////////////// /////////////////////////////////////////////////
class TC_Cgi; class TC_Cgi;
@ -37,6 +39,7 @@ class TC_HttpRequest;
/** /**
* @brief * @brief
* @brief Profile Exception Class
*/ */
struct TC_Cgi_Exception : public TC_Exception struct TC_Cgi_Exception : public TC_Exception
{ {
@ -48,11 +51,14 @@ struct TC_Cgi_Exception : public TC_Exception
/** /**
* @brief , * @brief ,
* TC_Common::tostr对 vector<TC_Cgi_Upload> * TC_Common::tostr对 vector<TC_Cgi_Upload>
* @brief Global Friend.
* By defining this function, you can use TC_Common::tostr to output vector<TC_Cgi_Upload>
*/ */
ostream &operator<<(ostream &os, const TC_Cgi_Upload &tcCgiUpload); ostream &operator<<(ostream &os, const TC_Cgi_Upload &tcCgiUpload);
/** /**
* @brief cgi上传文件操作cgi上传的文件信息 * @brief cgi上传文件操作cgi上传的文件信息
* @brief CGI Uploaded File Operation, you can get cgi uploaded file info from this class.
*/ */
class TC_Cgi_Upload class TC_Cgi_Upload
{ {
@ -61,6 +67,7 @@ public:
/** /**
* @brief * @brief
* @brief Constructor
*/ */
TC_Cgi_Upload() TC_Cgi_Upload()
:_sFileName("") :_sFileName("")
@ -73,26 +80,30 @@ public:
/** /**
* @brief . * @brief .
* @brief Copy Constructor
*/ */
TC_Cgi_Upload(const TC_Cgi_Upload &tcCgiUpload); TC_Cgi_Upload(const TC_Cgi_Upload &tcCgiUpload);
/** /**
* @brief * @brief
* @brief Assignment Constructor
*/ */
TC_Cgi_Upload & operator=(const TC_Cgi_Upload &tcCgiUpload); TC_Cgi_Upload & operator=(const TC_Cgi_Upload &tcCgiUpload);
/** /**
* @brief . * @brief .
* * @brief Get Uploaded Info
* return * @return
* @return Uploaded File Info
*/ */
string tostr() const; string tostr() const;
/** /**
* @brief IE INPUT上传控件的名称. * @brief IE INPUT上传控件的名称.
* * @brief Get the Client IE ; Input the name of the upload control
* return INPUT上传控件名称 * @return INPUT上传控件名称
* @return INPUT the name of the upload control
*/ */
string getFormFileName() const string getFormFileName() const
{ {
@ -101,8 +112,9 @@ public:
/** /**
* @brief INPUT控件用户输入的名称,. * @brief INPUT控件用户输入的名称,.
* * @brief Return the name from the imput control and the real file name from the Client.
* return * @return
* @return the real file name from the Client
*/ */
string retRealFileName() const string retRealFileName() const
{ {
@ -111,8 +123,9 @@ public:
/** /**
* @brief ,. * @brief ,.
* * @brief The server file name after uploading to the server.
* return * @return
* @return the file name from the Server.
*/ */
string getSeverFileName() const string getSeverFileName() const
{ {
@ -121,8 +134,9 @@ public:
/** /**
* @brief . * @brief .
* * @brief Get the size of the uploaded file.
* return size_t类型 * @return size_t类型
* @return size_t : the size of the uploaded file
*/ */
size_t getFileSize() const size_t getFileSize() const
{ {
@ -131,8 +145,9 @@ public:
/** /**
* @brief . * @brief .
* * @brief Determine whether the size of the uploaded file is oversize or not.
* return truefalse * @return truefalse
* @return bool: oversize, true ; not oversize, false
*/ */
bool isOverSize() const bool isOverSize() const
{ {
@ -143,26 +158,31 @@ protected:
/** /**
* ,file控件名称 * ,file控件名称
* Upload files,the name of the file control on the browser.
*/ */
string _sFileName; string _sFileName;
/** /**
* , * ,
* the real name of the uploaded file, the name of the file on the Client.
*/ */
string _sRealFileName; string _sRealFileName;
/** /**
* *
* the name of the server which uploaded the file
*/ */
string _sServerFileName; string _sServerFileName;
/** /**
* , * ,
* the size of the uploaded file, Bytes
*/ */
size_t _iSize; size_t _iSize;
/** /**
* *
* whether the uploaded file is oversize or not
*/ */
bool _bOverSize; bool _bOverSize;
@ -171,25 +191,29 @@ protected:
/** /**
* @brief cgi操作相关类. * @brief cgi操作相关类.
* @brief CGI Operation Related Classes
* *
* *
* * Main includes:
* 1 * 1
* * 1 Support parameter resolution
* 2 cookies解析 * 2 cookies解析
* * 2 Support cookies resolution
* 3 ,, * 3 ,,
* * 3 Support file uploading, setting the max number of uploaded files and the max size of a file.
* 4 , * 4 ,
* * 4 When uploading files, you need to check whether the files are oversize or not.
* 5 , * 5 ,
* * 5 When uploading files, you need to check
* whether the number of the uploaded files is limited.
* :,file控件必须取不同name, * :,file控件必须取不同name,
* * Notes : When multiple files are uploaded at the same time,
* the browser's file control must take a different name,
* otherwise the file will not be uploaded correctly.
* :parseCgi解析标准输入, * :parseCgi解析标准输入,
* * Atttention : When calling parseCgi to parse the standard input,
* setUpload, parseCgi之前调用 * setUpload, parseCgi之前调用
* * setUpload, which is called by the uploaded files, needs to be called before parseCgi.
*/ */
class TC_Cgi class TC_Cgi
{ {
@ -197,16 +221,19 @@ public:
/** /**
* @brief TC_Cgi构造函数 * @brief TC_Cgi构造函数
* @brief TC_Cgi Constructor
*/ */
TC_Cgi(); TC_Cgi();
/** /**
* @brief * @brief
* @brief Destructor
*/ */
virtual ~TC_Cgi(); virtual ~TC_Cgi();
/** /**
* @brief * @brief
* @brief Define the environment variables
*/ */
enum enum
{ {
@ -233,43 +260,59 @@ public:
/** /**
* @brief . * @brief .
* @brief Set the uploaded file.
* *
* @param sUploadFilePrefix, (), , * @param sUploadFilePrefix, (), ,
* ,"_序号" * ,"_序号"
* The file prefix (includes its path). If a file is uploaded, the file is saved in the path with the prefix as the name.
* If more than one file is uploaded, then the file name will be followed by "_ No."
*
* @param iMaxUploadFiles ,<0: * @param iMaxUploadFiles ,<0:
* Maximum number of uploaded files, if iMaxUploadFiles < 0 : no limit
*
* @param iUploadMaxSize () * @param iUploadMaxSize ()
* Maximum size uploaded per file (Bytes)
*/ */
void setUpload(const string &sUploadFilePrefix, int iMaxUploadFiles = 5, size_t iUploadMaxSize = 1024*1024*10, size_t iMaxContentLength = 1024*1024*10); void setUpload(const string &sUploadFilePrefix, int iMaxUploadFiles = 5, size_t iUploadMaxSize = 1024*1024*10, size_t iMaxContentLength = 1024*1024*10);
/** /**
* @brief cgi. * @brief cgi.
* @brief Analyze CGI from standard input
*/ */
void parseCgi(); void parseCgi();
/** /**
* @brief http请求解析. * @brief http请求解析.
* @brief Request parsing directly from http.
* *
* @param request http请求 * @param request http请求
* @param request http request
*/ */
void parseCgi(const TC_HttpRequest &request); void parseCgi(const TC_HttpRequest &request);
/** /**
* @brief cgi的url参数multimap. * @brief cgi的url参数multimap.
* @brief Get the URL parameter of CGI : Multimap
* *
* @return multimap<string, string>cgi的url参数 * @return multimap<string, string> cgi的url参数
* @return multimap<string, string> the URL parameter of CGI
*/ */
const multimap<string, string> &getParamMap() const; const multimap<string, string> &getParamMap() const;
/** /**
* @brief cgi环境变量map. * @brief cgi环境变量map.
* @brief Get CGI environment variable: Map
* *
* @return map<string,string>cgi的环境变量 * @return map<string,string> cgi的环境变量
* @return map<string,string> the environment variable of CGI
*/ */
map<string, string> getEnvMap() const { return _env; } map<string, string> getEnvMap() const { return _env; }
/** /**
* @brief cgi的参数map, multimap转换成map返回 * @brief cgi的参数map, multimap转换成map返回
* , , . * , , .
* @brief Get the CGI parameter, map, and convert Multimap to Map as return.
* If a parameter name corresponds to more than one parameter value, only one value is taken.
* *
* @return map<string, string> * @return map<string, string>
*/ */
@ -277,6 +320,7 @@ public:
/** /**
* @brief cookies的参数map. * @brief cookies的参数map.
* @brief Get cookies' parameter : map
* *
* @return map<string, string> * @return map<string, string>
*/ */
@ -284,165 +328,203 @@ public:
/** /**
* @brief cgi的某个参数. * @brief cgi的某个参数.
* @brief Get a certain parameter from CGI
* *
* @param sName * @param sName parameter name
* @return * @return
*/ */
string &operator[](const string &sName); string &operator[](const string &sName);
/** /**
* @brief cgi的某个参数. * @brief cgi的某个参数.
* @brief Get a certain parameter from CGI
* *
* @param sName * @param sName parameter name
* @return * @return the value of the parameter
*/ */
string getValue(const string& sName) const; string getValue(const string& sName) const;
/** /**
* @brief . * @brief .
* @brief Get multiple values of a parameter with a name.
* *
* checkbox这类控件的值( ,) * checkbox这类控件的值( ,)
* @param sName * This is used to parse the value of a control such as a checkbox (one parameter name, multiple parameter values)
* @param vtValue vector * @param sName / the parameter name
* @param vtValue vector / vector composed of the parameter value of the name
* @return vector<string>, vector * @return vector<string>, vector
* @return vector<string> vector composed of the parameter value of the name
*/ */
const vector<string> &getMultiValue(const string& sName, vector<string> &vtValue) const; const vector<string> &getMultiValue(const string& sName, vector<string> &vtValue) const;
/** /**
* @brief cookie值. * @brief cookie值.
* @brief Get the cookie value.
* *
* @param sName cookie名称 * @param sName cookie名称 / the name of the cookie
* @return string类型的cookie值 * @return string类型的cookie值 / Cookie value of type string
*/ */
string getCookie(const string& sName) const; string getCookie(const string& sName) const;
/** /**
* @brief cookie值. * @brief cookie值.
* @brief Set cookie value.
* *
* @param sName cookie名称 * @param sName cookie名称 / cookie name
* @param sValue cookie值 * @param sValue cookie值 / cookie value
* @param sExpires * @param sExpires / the expire date
* @param sPath cookie有效路径 * @param sPath cookie有效路径 / cookie valid path
* @param sDomain cookie有效域 * @param sDomain cookie有效域 / cookie valid domain
* @param bSecure (ssl时有效) * @param bSecure (ssl时有效) / Whether it is secure (valid in SSL)
* @return cookie值 * @return cookie值 / returns a string which representing the cookie value
*/ */
string setCookie(const string &sName, const string &sValue, const string &sExpires="", const string &sPath="/", const string &sDomain = "", bool bSecure = false); string setCookie(const string &sName, const string &sValue, const string &sExpires="", const string &sPath="/", const string &sDomain = "", bool bSecure = false);
/** /**
* @brief . * @brief .
* @brief Whether the parameter list is empty.
* *
* @return truefalse * @return truefalse
* @return bool : true, the parameter list is empty ; false, the parameter list is not empty
*/ */
bool isParamEmpty() const; bool isParamEmpty() const;
/** /**
* @brief . * @brief .
* Wether the parameter exists or not.
* *
* @param sName * @param sName / the parameter name
* @return truefalse * @return truefalse / if exists retrun true, else return false.
*/ */
bool isParamExist(const string& sName) const; bool isParamExist(const string& sName) const;
/** /**
* @brief , * @brief ,
* , * ,
* Wheter the size of the uploaded file is scale out.
* When uploading multiple files, it is scale out as long as there's one file exceeds the size.
* @return truefalse * @return truefalse
* According to the standard above, if it is oversize, return true, else return false.
*/ */
bool isUploadOverSize() const; bool isUploadOverSize() const;
/** /**
* @brief ,, * @brief ,,
* , * ,
* Wheter the size of the uploaded file is scale out.
* When uploading multiple files, it is scale out as long as there's one file exceeds the size.
* @param vtUploads (file控件的名称) * @param vtUploads (file控件的名称)
* Returns the name of a file larger than the size (the name of the browser file control)
* @return truefalse * @return truefalse
* According to the standard above, if it is oversize, return true, else return fals.
*/ */
bool isUploadOverSize(vector<TC_Cgi_Upload> &vtUploads) const; bool isUploadOverSize(vector<TC_Cgi_Upload> &vtUploads) const;
/** /**
* @brief . * @brief .
* Wheter the number of uploaded files exceeds.
* *
* @return truefalse * @return truefalse
* bool : true, the number of the uploaded files exceeds ; false, else
*/ */
bool isOverUploadFiles() const { return _bOverUploadFiles; } bool isOverUploadFiles() const { return _bOverUploadFiles; }
/** /**
* @brief . * @brief .
* Get the number of uploaded files
* *
* @return size_t上传文件的个数 * @return size_t上传文件的个数
* size_t the number of uploaded files
*/ */
size_t getUploadFilesCount() const; size_t getUploadFilesCount() const;
/** /**
* @brief * @brief
* Get the related info about the uploaded files
* *
* @return map<string,TC_Cgi_Upload> * @return map<string,TC_Cgi_Upload>
* map * map
* In the structure map<string,TC_Cgi_Upload>,
* the map which stored the file name and the file's related information.
*/ */
const map<string, TC_Cgi_Upload> &getUploadFilesMap() const; const map<string, TC_Cgi_Upload> &getUploadFilesMap() const;
/** /**
* @brief . * @brief .
* Get the environment variables
* *
* @param iEnv * @param iEnv / Enumerating variables
* @return * @return / Environment variables
*/ */
string getCgiEnv(int iEnv); string getCgiEnv(int iEnv);
/** /**
* @brief . * @brief .
* Get the environment variables
* *
* @param sEnv * @param sEnv / the environment variable name
* @return * @return / the envitonment variable name
*/ */
string getCgiEnv(const string& sEnv); string getCgiEnv(const string& sEnv);
/** /**
* @brief . * @brief .
* Set environment variales
* *
* @param sName * @param sName / environment variable name
* @param sValue * @param sValue / environment variable value
*/ */
void setCgiEnv(const string &sName, const string &sValue); void setCgiEnv(const string &sName, const string &sValue);
/** /**
* @brief html头content-type . * @brief html头content-type .
* Return HTML header, content type
* *
* @param sHeader "text/html" * @param sHeader "text/html"
* The default value is "text / HTML"
* @return * @return
*/ */
static string htmlHeader(const string &sHeader = "text/html"); static string htmlHeader(const string &sHeader = "text/html");
/** /**
* @brief http请求的url解码, %. * @brief http请求的url解码, %.
* The URL of the HTTP request is decoded and the one after% is replaced with a character.
* *
* @param sUrl http请求url * @param sUrl http请求url / HTTP request URL
* @return * @return / the encoded string
*/ */
static string decodeURL(const string &sUrl); static string decodeURL(const string &sUrl);
/** /**
* @brief url进行编码, %XX代替. * @brief url进行编码, %XX代替.
* Encode the URL with% XX instead of numbers and letters.
* *
* @param sUrl http请求url * @param sUrl http请求url / HTTP request URL
* @return url * @return url / the encoded string
*/ */
static string encodeURL(const string &sUrl); static string encodeURL(const string &sUrl);
/** /**
* @brief HTML编码(<>"&) * @brief HTML编码(<>"&)
* HTML encoding of the source string (< > "& ').
* *
* the source string
* @param src * @param src
*
* Whether encoding the 'space' (space, \t, \r\n, \n)
* @param blankEncode (, \t, \r\n, \n) * @param blankEncode (, \t, \r\n, \n)
*
* HTML encoded string
* @return HTML编码后的字符串 * @return HTML编码后的字符串
*/ */
static string encodeHTML(const string &src, bool blankEncode = false); static string encodeHTML(const string &src, bool blankEncode = false);
/** /**
* @brief XML编码(<>"&'). * @brief XML编码(<>"&').
* * XML encoding of the source string (< > "& ').
* @param src * @param src / Source string
* @return XML编码后的字符串 * @return XML编码后的字符串 / XML encoded string
*/ */
static string encodeXML(const string &src); static string encodeXML(const string &src);
@ -450,13 +532,14 @@ protected:
/** /**
* @brief ,,使 * @brief ,,使
* Declare, but do not define, to ensure that this function will not be used.
*/ */
TC_Cgi &operator=(const TC_Cgi &tcCgi); TC_Cgi &operator=(const TC_Cgi &tcCgi);
/** /**
* @brief GET method. * @brief GET method.
* *
* @param sBuffer GET的QueryString * @param sBuffer GET的QueryString / the QueryString of GET
* return * return
*/ */
void getGET(string &sBuffer); void getGET(string &sBuffer);
@ -464,60 +547,65 @@ protected:
/** /**
* @brief POST method. * @brief POST method.
* *
* @param sBuffer POST的QueryString * @param sBuffer POST的QueryString / the QueryString of POST
* return * return
*/ */
void getPOST(string &sBuffer); void getPOST(string &sBuffer);
/** /**
* @brief . * @brief .
* Parsing file upload
* *
* @param mmpParams [out]multimap * @param mmpParams [out]multimap / output multimap
* return * return
*/ */
void parseUpload(multimap<string, string> &mmpParams); void parseUpload(multimap<string, string> &mmpParams);
/** /**
* @brief form数据 * @brief form数据
* Parsing form data
*/ */
void parseFormData(multimap<string, string> &mmpParams, const string &sBoundary); void parseFormData(multimap<string, string> &mmpParams, const string &sBoundary);
/** /**
* @brief * @brief
* Ignore empty lines
*/ */
void ignoreLine(); void ignoreLine();
/** /**
* @brief . * @brief .
* * Write File
* @param sFileName * @param sFileName / file name
* @param sBuffer * @param sBuffer / contents needs to be wrote.
*/ */
bool writeFile(FILE*fp, const string &sFileName, const string &sBuffer, size_t &iTotalWrite); bool writeFile(FILE*fp, const string &sFileName, const string &sBuffer, size_t &iTotalWrite);
/** /**
* @brief . * @brief .
* * Analysis in non upload mode
* @param mmpParams [out]multimap * @param mmpParams [out]multimap / output multimap
* @param sBuffer [in]QueryString * @param sBuffer [in]QueryString / output QueryString
* return * return
*/ */
void parseNormal(multimap<string, string> &mmpParams, const string& sBuffer); void parseNormal(multimap<string, string> &mmpParams, const string& sBuffer);
/** /**
* @brief cookies. * @brief cookies.
* Parsing cookies
* *
* @param mpCooies [out]cookiesmap * @param mpCooies [out]cookiesmap / output mpCookies
* @param sBuffer [in]Cookies字符串 * @param sBuffer [in]Cookies字符串/ input string Cookies
* return * return
*/ */
void parseCookies(map<string, string> &mpCooies, const string& sBuffer); void parseCookies(map<string, string> &mpCooies, const string& sBuffer);
/** /**
* @brief cgi input的基本流程. * @brief cgi input的基本流程.
* Control the basic process of parsing CGI input
* *
* @param mmpParams [out] multimap * @param mmpParams [out] multimap / output multimap
* @param mpCooies [out]cookies * @param mpCooies [out]cookies / output multimap
* return * return
*/ */
void readCgiInput(multimap<string, string> &mmpParams, map<string, string> &mpCooies); void readCgiInput(multimap<string, string> &mmpParams, map<string, string> &mpCooies);
@ -531,21 +619,25 @@ protected:
/** /**
* *
* Stream
*/ */
istringstream _iss; istringstream _iss;
/** /**
* *
* Read in
*/ */
istream *_is; istream *_is;
/** /**
* *
* environmet variable
*/ */
map<string, string> _env; map<string, string> _env;
/** /**
* cgi参数 * cgi参数
* CGI parameter
*/ */
multimap<string, string> _mmpParams; multimap<string, string> _mmpParams;
@ -556,36 +648,43 @@ protected:
/** /**
* *
* Upload file name prefix
*/ */
string _sUploadFilePrefix; string _sUploadFilePrefix;
/** /**
* ,<0: * ,<0:
* Maximum number of uploaded files, < 0: Unlimited
*/ */
int _iMaxUploadFiles; int _iMaxUploadFiles;
/** /**
* *
* Maximum size of uploaded file
*/ */
size_t _iUploadMaxSize; size_t _iUploadMaxSize;
/** /**
* *
* Whether the number of the uploaded file is exceeded.
*/ */
bool _bOverUploadFiles; bool _bOverUploadFiles;
/** /**
* content-length * content-length
* the max content-length
*/ */
size_t _iMaxContentLength; size_t _iMaxContentLength;
/** /**
* , * ,
* Determine whether the file is oversize or not, as long as one file is oversize that _bUploadFileOverSize is ture
*/ */
bool _bUploadFileOverSize; bool _bUploadFileOverSize;
/** /**
* map中 * map中
* the related infomation about the uploaded files is stored in this map
*/ */
map<string, TC_Cgi_Upload> _mpUpload; map<string, TC_Cgi_Upload> _mpUpload;
}; };