simplify server protocol parsing