Compare HTTP headers case-insensitively

See <https://groups.google.com/d/msg/nodejs/XIU55IYtfJo/feUp9Fz7p14J>
This commit is contained in:
Daniel Brockman 2014-09-17 22:48:05 +02:00
parent 07e3947ed4
commit bd846576f6

View file

@ -172,7 +172,7 @@ http::request connection::read_request()const {
fc::string request::get_header( const fc::string& key )const {
for( auto itr = headers.begin(); itr != headers.end(); ++itr ) {
if( itr->key == key ) { return itr->val; }
if( boost::iequals(itr->key, key) ) { return itr->val; }
}
return fc::string();
}