Well assuming you're going to be using it on a 40D and taking the crop factor into consideration, then don't forget that a 50mm lens becomes an effective 80mm focal length while an 85mm lens becomes effectively 136mm. You'd get quite a restricted field of view compared to using either lens on a full frame body, but either lens would give you very good effective focal lengths for portraiture with shallow DOF and good bokeh.
The difficulty is using the lenses in cramped spaces, where you can't get far enough away from your subject to frame as you'd like, and if that's going to be the case then the 50mm will more practical and usable in more situations.
If it's just a straight choice with no worries about confined spaces then take the 85mm every time.