add cookie feature.
change keep-alive timeout mechanism