Inspired by the discussion in the comments of [this question](https://mathoverflow.net/questions/150226/characterization-of-compact-space-up-to-homotopy-equivalent), I'd like to ask the following question: is it possible to characterize the class of spaces that are homotopy equivalent (or weak equivalent) to compact Hausdorff spaces? As noted in the linked question's comments, no locally connected space with infinitely many components can be homotopy equivalent to a compact Hausdorff space. Are there any other restrictions? Is every path-connected space homotopy equivalent to a compact Hausdorff space? It seems plausible to me that every space might at least be weak equivalent to a compact Hausdorff space: perhaps the topology on an infinite CW-complex can be coarsened to be compact Hausdorff without changing the weak homotopy type.


Update: I've accepted Jeremy Rickard's answer, as it seems to more or less completely answer the case of weak equivalence (amazingly, every space is weak equivalent to a compact Hausdorff space iff there does not exist a measurable cardinal). The comments indicate that spaces having the (strong) homotopy type of compact Hausdorff spaces are much more restricted; I'd still welcome answers elaborating further on this.



Which spaces have the (weak) homotopy type of compact Hausdorff spaces?
Expanding on my comment, if there are measurable cardinals then it follows from the results of


A. Przeździecki, Measurable cardinals and fundamental groups of compact spaces. 
Fund. Math. 192 (2006), no. 1, 87–92. 


that there are spaces not weakly equivalent to any compact Hausdorff space, as Przeździecki proves that (if and only if there is a measurable cardinal) there are groups $G$ that are not the fundamental group of any compact Hausdorff space, and so the classifying space of such a group is a counterexample.


He also proves that every group of non-measurable cardinality is the fundamental group of a path-connected compact space, answering a question of Keesling and Rudyak who had earlier proved this with "connected" in place of "path-connected" in


J.E. Keesling and Y.B. Rudyak, On fundamental groups of compact Hausdorff spaces.
Proc. Amer. Math. Soc. 135 (2007), no. 8, 2629–2631.


