OSDN Git Service

bug fix.
authorvisor <visor@users.sourceforge.jp>
Tue, 10 Sep 2013 13:43:43 +0000 (22:43 +0900)
committervisor <visor@users.sourceforge.jp>
Tue, 10 Sep 2013 13:43:43 +0000 (22:43 +0900)
lib/http.cc

index e02ae96..0f89fe3 100644 (file)
@@ -859,12 +859,12 @@ void  HTTPSend::readReplyBody (TcpClient& client, TcpBuf& buf, ustring& ans) {
     ans = fixUTF8 (rcv (ostr.str ()));
 }
 
-const ustring*  HTTPSend::findHeader (const ustring& name) {
+const ustring*  HTTPSend::findHeader (const ustring& name) { // nameは小文字に変換すること
     std::vector<mapelem>::const_iterator  b = header_reply.begin ();
     std::vector<mapelem>::const_iterator  e = header_reply.end ();
 
     for (; b < e; b ++) {
-       if (b->first == name) {
+       if (toLower (b->first) == name) {
            return &b->second;
        }
     }