fix: substituted table.getn() by #
fix: changed cookie's string type to table as code required
optimize: lowered the Content-Length header