ESP8266WebServer cookie save problem

You've got one too many "Set-Cookie" in there and you don't need to trailing semi-colon.

server.sendHeader("Set-Cookie", "cookiename=cookiecontent;expires=31536000");