script output fields is checked for duplicate
This commit is contained in:
@@ -267,7 +267,8 @@ size_t
|
||||
err++;
|
||||
continue;
|
||||
}
|
||||
key = ::str_tolower(key); // to make "key" case_insensitive
|
||||
// bad idea, in cgi we need to have the original value
|
||||
// key = ::str_tolower(key); // to make "key" case_insensitive
|
||||
val = (*it).substr(pos + 1);
|
||||
val = ::trim(val, ' ');
|
||||
fields.insert( std::pair<std::string, std::string>(key, val) );
|
||||
@@ -275,6 +276,23 @@ size_t
|
||||
return err;
|
||||
}
|
||||
|
||||
void str_map_key_tolower(std::map<std::string, std::string> & mp)
|
||||
{
|
||||
std::map<std::string, std::string> new_mp;
|
||||
std::map<std::string, std::string>::iterator it;
|
||||
std::string key;
|
||||
std::string value;
|
||||
|
||||
for (it = mp.begin(); it != mp.end(); it++)
|
||||
{
|
||||
key = it->first;
|
||||
value = it->second;
|
||||
key = ::str_tolower(key);
|
||||
new_mp.insert( std::pair<std::string, std::string>(key, value) );
|
||||
}
|
||||
mp.swap(new_mp);
|
||||
}
|
||||
|
||||
// DEBUG
|
||||
void print_special(std::string str)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user