diff options
author | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-01-31 21:56:42 +0100 |
---|---|---|
committer | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-01-31 21:56:42 +0100 |
commit | 968f41ba511f8f74377b1a1c7b61ff759ebe3078 (patch) | |
tree | c52f95f94444254cd93e8e3460f7013eaab18b41 /source/cWebAdmin.cpp | |
parent | Slight code cleanup, no big changes (diff) | |
download | cuberite-968f41ba511f8f74377b1a1c7b61ff759ebe3078.tar cuberite-968f41ba511f8f74377b1a1c7b61ff759ebe3078.tar.gz cuberite-968f41ba511f8f74377b1a1c7b61ff759ebe3078.tar.bz2 cuberite-968f41ba511f8f74377b1a1c7b61ff759ebe3078.tar.lz cuberite-968f41ba511f8f74377b1a1c7b61ff759ebe3078.tar.xz cuberite-968f41ba511f8f74377b1a1c7b61ff759ebe3078.tar.zst cuberite-968f41ba511f8f74377b1a1c7b61ff759ebe3078.zip |
Diffstat (limited to 'source/cWebAdmin.cpp')
-rw-r--r-- | source/cWebAdmin.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/source/cWebAdmin.cpp b/source/cWebAdmin.cpp index 002505c1f..b99b8e779 100644 --- a/source/cWebAdmin.cpp +++ b/source/cWebAdmin.cpp @@ -136,10 +136,22 @@ void cWebAdmin::Request_Handler(webserver::http_request* r) HTTPRequest Request;
Request.Username = r->username_;
Request.Method = r->method_;
- Request.Params = new cStringMap(r->params_);
- Request.PostParams = new cStringMap(r->params_post_);
+ Request.Params = r->params_;
+ Request.PostParams = r->params_post_;
Request.Path = r->path_;
+ for( unsigned int i = 0; i < r->multipart_formdata_.size(); ++i )
+ {
+ webserver::formdata& fd = r->multipart_formdata_[i];
+
+ HTTPFormData HTTPfd;//( fd.value_ );
+ HTTPfd.Value = fd.value_;
+ HTTPfd.Type = fd.content_type_;
+ HTTPfd.Name = fd.name_;
+ LOGINFO("Form data name: %s", fd.name_.c_str() );
+ Request.FormData[ fd.name_ ] = HTTPfd;
+ }
+
if( Split.size() > 1 )
{
for( PluginList::iterator itr = WebAdmin->m_Plugins.begin(); itr != WebAdmin->m_Plugins.end(); ++itr )
@@ -159,9 +171,6 @@ void cWebAdmin::Request_Handler(webserver::http_request* r) }
}
- delete Request.Params;
- delete Request.PostParams;
-
if( FoundPlugin.empty() ) // Default page
{
Content.clear();
|