| 109 | } |
| 110 | |
| 111 | bool HTTPRequest::getParam(const char* param, std::string& val) const { |
| 112 | val = ""; |
| 113 | if (!param) { |
| 114 | return false; |
| 115 | } |
| 116 | |
| 117 | std::string p; |
| 118 | tolower(param, p); |
| 119 | |
| 120 | std::map<std::string, std::vector<std::string> >::const_iterator itr = parameters.find(p); |
| 121 | if (itr != parameters.end()) { |
| 122 | if (itr->second.size()) { |
| 123 | val = itr->second[itr->second.size() - 1]; |
| 124 | } |
| 125 | return true; |
| 126 | } |
| 127 | return false; |
| 128 | } |
| 129 | |
| 130 | bool HTTPRequest::getParam(const std::string& param, std::string& val) const { |
| 131 | val = ""; |
no test coverage detected