I asked this question on math.stackexchange a week ago, but did not get an answer.

First of all, I don't want to restrict to any kind of "nice spaces" since I am interested in the most general situation. Especially I do not work in any "convenient" category of spaces.

Wikipedia defines a classifying space of a topological group $G$ as the quotient space of a weakly contractible space $EG$ with respect to a free action of $G$ on $EG$, which confuses me.

For me, a classifying space $BG$ should be a space for which there exists a principal $G$-bundle $$G\rightarrow EG\rightarrow BG,$$ such that for sufficiently nice spaces $X$ the homotopy classes from $X$ to $BG$ are in bijection (via pullback of the bundle $EG\rightarrow BG$) to the set of isomorphism classes of principles $G$-bundles on $X$. I think it was Milnor (Can you give me a reference?) that showed that universality of the bundle $EG\rightarrow BG$ is equivalent to the (weak?) contractibility of $EG$.

From this viewpoint the definition of wikipedia suggests the quotient map of any weakly contractible space to the quotient via a free group action of $G$ being a principle $G$-bundle. This sounds strange to me as I would except, that I will need more topological restrictions on my spaces for this to work.

So here is the question: Which are the exact most general topological restrictions to each space, such that the situations I described work out? To be more specific:

- When is the quotient map of a space with respect to a free action of a topological group $G$ a principal $G$-bundle?
- Does the definition of wikipedia gives me always the right thing?
- What is the canonical reference for the claim that a principal $G$-bundle is universal iff it's total space is (weakly?) contractible?
- Which topological restrictions on $X$ do I need such that $[X,BG]$ classifies what it should classify?