Minor bug fixes. Added 302 redirect

This commit is contained in:
2015-04-15 18:38:44 +08:00
parent 1b361227e7
commit 21dfcaca0e
3 changed files with 57 additions and 20 deletions

View File

@@ -1,11 +1,20 @@
var encodeCookie = function( cookie )
{
var cookieStr = "";
var p = "";
for( var i in cookie )
{
if( i.toLowerCase() == "path" )
{
p = cookie[i];
continue;
}
cookieStr += i + "=" + encodeURI( cookie[i] ) + ";";
}
// Path at tail
cookieStr += "path=" + p + ";";
return cookieStr;
};