Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58116 Fix a regression in the fix for bug 57281 that broke Comet support when running under a security manager. Based on a patch provided by Johno Crawford.