The way I ultimately solved the problem was to examine the requests generated by both Safari and Firefox. One important difference was that Firefox was sending a "Keep-Alive: 300" header, while Safari wasn't. This gave me the idea of modifying the redirection to