| 271 | } |
| 272 | |
| 273 | fl::optional<fl::string> HttpRequestParser::getHeader(const char* name) const { |
| 274 | fl::string lowerName = toLower(name); |
| 275 | |
| 276 | for (const auto& pair : req().headers) { |
| 277 | if (toLower(pair.first) == lowerName) { |
| 278 | return pair.second; |
| 279 | } |
| 280 | } |
| 281 | |
| 282 | return fl::nullopt; |
| 283 | } |
| 284 | |
| 285 | //============================================================================== |
| 286 | // HttpResponseParser |