Hi,
Currently having an intermittent problem with Apache, mod_perl and a content type handler. Might be fairly unlikely that anyone here can help, but thought I'd throw it out and see if anyone has seen anything similar.
Basically, I'm working on a high traffic site, which is running some mod_perl code. During the translation phase, it decides if it knows the content type of the file it's serving (which 99% of the time it does), and if so uses
push_handlers() to add a content type handler. The content type handler simply sets the content type of the response correctly.
This is all well and good, but there are times (a very small percentage of traffic) when the content type for html files is set to text/plain, even though the app knows it should be text/html. As far as I can tell, there's no reason for the mod_perl content type handler to return text/plain.
To make matters slightly more interesting, Apache is actually configured with a DefaultType of text/html, which appears to be getting ignored (I've hacked the system so that the content type handler returns nothing, and I receive the text/plain header, not the text/html default I would expect).
So the problem seems to be (in the intermittent problem cases):
- Apache (or mod_perl?) is not reading the return value of the content type handler, and
- The DefaultType value is being ignored
Again, just to stress, the vast majority of requests are fine. There is no pattern in terms of specific pages on the site, specific servers, etc.
Admittedly, I can't be 100% sure the content type handler *is* actually returning something (and that it is returning text/html), but some of the other details of the system make me more sure than may be apparent in this post :)
So has anyone seen anything similar to this?
(BTW, Apache 1.3, mod_perl 1.3, perl 5.8.x)