This morning's expedition into the bizzare involved tracking down an obscure interaction between mod_perl 1.99 and CGI::Simple. Normally, these two get along just fine, though we noticed a while back that file uploads would cause later users of the same Apache process (e.g., some other browser) to lose URI arguments. (Finding this involved some fine detective work and a bit of luck.) The fix at the time was to note that a multipart/form-data post had just been handled, then rflush the request object and exit the process. File uploads were infrequent in our app, so forcing Apache to start a new process was no big deal.
Time passes, and along comes a feature that requires keeping the connection alive. Debugging ensues.
When the dust settled, it appears that there are two problems that manage to avoid each other almost all of the time. The first is that the Apache object hangs on to the request type (which is normally undefined, but will be multipart/form-data when a correctly coded file upload happens), and reports this as the type for subsequent requests, including GETs. An oops, but a mostly benign one.
The complementary problem, in CGI::Simple, is that requests with a type of multipart/form-data get special handling, regardless of the request method. If the request doesn't include arguments, nobody notices. But if there are URI arguments, they get ignored in favor of a non-existent form. An oops, and one that would occassional cause our app to squawk.
I suggested a fix in the bug report: only do the multipart/form-data handling if the request method is POST.
Debugging Apache processes isn't fun, but it beats late holiday shopping.