applying patch from adiroiban

git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/branches/custom-session-name-6933-2@43334 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb