Sb. Smith, RATIONAL HOMOTOPY OF THE SPACE OF SELF-MAPS OF COMPLEXES WITH FINITELY MANY HOMOTOPY-GROUPS, Transactions of the American Mathematical Society, 342(2), 1994, pp. 895-915
For simply connected CW complexes X with finitely many, finitely gener
ated homotopy groups,1 the path components of the function space M(X,
X) of free self-maps of X are all of the same rational homotopy type i
f and only if all the k-invariants of X are of finite order. In case X
is rationally a two-stage Postnikov system the space M0(X, X) of ines
sential self-maps of X has the structure of rational H-space if and on
ly if the k-invariants of X are of finite order.