OSDN Git Service

bug fix.
authorvisor <visor@users.sourceforge.jp>
Mon, 12 Nov 2012 13:37:43 +0000 (22:37 +0900)
committervisor <visor@users.sourceforge.jp>
Mon, 12 Nov 2012 13:37:43 +0000 (22:37 +0900)
lib/http.cc

index db28d7a..ea2468e 100644 (file)
@@ -56,7 +56,7 @@ void  HTTPResponse::setCookie (const ustring& key, const ustring& val, const ust
        ck.append (CharConst ("; path="));
        u = apacheAbsolutePath (path);
        len = u.length ();
-       if (len > 0 && u[len - 1] == '/') {
+       if (len > 1 && u[len - 1] == '/') { // '/'のみはOK。
            u.resize (len - 1);
        }
        ck.append (u);