added: parser for multipart forms, files: postmultiparser.h postmultiparser.cpp
added: function: upload git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@543 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#include "compress.h"
|
||||
#include "acceptencodingparser.h"
|
||||
#include "htmlfilter.h"
|
||||
|
||||
#include "postmultiparser.h"
|
||||
|
||||
|
||||
struct Request
|
||||
@@ -48,9 +48,10 @@ struct Request
|
||||
std::ostringstream headers, page, debug, notify;
|
||||
|
||||
|
||||
GetTable get_table;
|
||||
PostTable post_table;
|
||||
CookieTable cookie_table;
|
||||
GetTable get_table;
|
||||
PostTable post_table;
|
||||
PostFileTable post_file_table;
|
||||
CookieTable cookie_table;
|
||||
|
||||
// environment variables
|
||||
// they are not null -- when the server doesn't have such a variable
|
||||
@@ -63,6 +64,7 @@ struct Request
|
||||
const char * env_http_user_agent;
|
||||
const char * env_http_accept_encoding;
|
||||
const char * env_fcgi_role;
|
||||
const char * env_content_type;
|
||||
|
||||
// true if the browser is Microsoft Internet Explorer
|
||||
bool browser_msie;
|
||||
@@ -111,6 +113,7 @@ struct Request
|
||||
void PrintIn();
|
||||
|
||||
Request();
|
||||
void ClearPostFileTmp();
|
||||
void Clear();
|
||||
|
||||
void Init();
|
||||
@@ -146,10 +149,13 @@ struct Request
|
||||
bool CanRemove(const Item & item);
|
||||
bool CanUseEmacs(const Item & item, bool check_root = false);
|
||||
bool CanUseMkdir(const Item & item, bool check_root = false);
|
||||
|
||||
bool CanUseUpload(const Item & item, bool check_root = false);
|
||||
|
||||
bool CanUseHtml(long user_id);
|
||||
bool CanUseBBCode(long user_id);
|
||||
|
||||
bool MakeDirsOnFS(std::string & path);
|
||||
|
||||
private:
|
||||
|
||||
enum Header
|
||||
@@ -171,6 +177,9 @@ private:
|
||||
// it contains '\0'
|
||||
const char char_empty;
|
||||
|
||||
|
||||
PostMultiParser post_multi_parser;
|
||||
|
||||
const char * SetEnvVar(const char * var);
|
||||
void StandardLog();
|
||||
|
||||
@@ -178,6 +187,7 @@ private:
|
||||
AcceptEncodingParser accept_encoding_parser;
|
||||
HTMLFilter html_filter;
|
||||
|
||||
|
||||
// html after filtering
|
||||
std::string clean_html;
|
||||
|
||||
|
Reference in New Issue
Block a user