update status codes to rfc-2616 and fix tests