From 0be5ac6ffbc7309ea4a4612b2e90dded33164823 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 21 Aug 2012 23:22:33 +0900 Subject: [PATCH] spdycat: use locale-free strieq instead strcasecmp --- examples/spdylay_ssl.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/spdylay_ssl.cc b/examples/spdylay_ssl.cc index 1270f900..8cbb4da3 100644 --- a/examples/spdylay_ssl.cc +++ b/examples/spdylay_ssl.cc @@ -43,6 +43,7 @@ #include #include "spdylay_ssl.h" +#include "util.h" namespace spdylay { @@ -164,13 +165,13 @@ int Spdylay::submit_request(const std::string& hostport, while( i != end ) { const char *key = (*i).first.c_str(); const char *value = (*i).second.c_str(); - if ( strcasecmp( key, "accept" ) == 0 ) { + if ( util::strieq( key, "accept" ) ) { nv[POS_ACCEPT*2+1] = value; } - else if ( strcasecmp( key, "user-agent" ) == 0 ) { + else if ( util::strieq( key, "user-agent" ) ) { nv[POS_USERAGENT*2+1] = value; } - else if ( strcasecmp( key, "host" ) == 0 ) { + else if ( util::strieq( key, "host" ) ) { nv[POS_HOST*2+1] = value; } else {