def METHOD_NAME(ecode):
    """ generate an error string from the given code """
    ec=atoi(str(ecode))
    if BaseHTTPRequestHandler.responses.has_key(ec):
        return "HTTP/1.1 %s %s" %(ec, BaseHTTPRequestHandler.responses[ec][0])
    else:
        return "HTTP/1.1 %s" %(ec)