Go to the documentation of this file.00001 # include "DQM/TrackerCommon/interface/CgiReader.h"
00002
00003
00004
00005
00006 void CgiReader::read_form(std::multimap<std::string, std::string> &form_info)
00007 {
00008 cgicc::Cgicc reader(in);
00009
00010 std::vector<cgicc::FormEntry> entries = reader.getElements();
00011
00012
00013
00014 form_info.clear();
00015
00016 for (unsigned int i = 0; i < entries.size(); i++)
00017 {
00018 std::string name = entries[i].getName();
00019 std::string value = entries[i].getValue();
00020
00021
00022
00023 std::pair<std::string, std::string> map_entry(name, value);
00024 form_info.insert(map_entry);
00025 }
00026 }
00027
00028 std::string CgiReader::read_cookie(std::string name)
00029 {
00030 cgicc::Cgicc reader(in);
00031 std::string value;
00032
00033 const cgicc::CgiEnvironment& env = reader.getEnvironment();
00034
00035 cgicc::const_cookie_iterator it;
00036 for (it = env.getCookieList().begin();
00037 it != env.getCookieList().end();
00038 it ++)
00039 {
00040 if (name == it->getName())
00041 {
00042 value = it->getValue();
00043 }
00044 }
00045 return value;
00046 }
00047