The rescue block at line 103 tries to catch ::Timeout::Error and ::Errno::EPIPE. This won't help much because send_request_request() will handle the exceptions first, and then return nil.  Whatever script is using it (typo3_sa_2010_020) will not catch the exceptions, instead all it gets is a nil.