Bayes' Theorem and improper priors


I know Bayes' Theorem applies to both discrete and continuous probability distributions, and also seeing as how, given certain conditions, improper priors can lead to proper posteriors with Bayes' Theorem, but is the use of this theorem still valid? I don't see how it is, since we're no longer dealing with discrete prior probabilities or even probability functions that integrate to 1 (some priors even integrate to infinity, meaning there is no normalizing constant to cancel out!). What conditions are required in order to make the use of the theorem valid? Does the theorem actually extend out of just probabilistic functions? Thanks in advance.