I posted this question on the modperl list, but I figured I'd bring it over here, too.
I've been pulling my hair out this evening trying to resolve a problem serving content to a cell phone.
Phone is a LG VX-4500. I've written a simple handler as a start to just send "Hello" to the phone along with a Content-Length and Connection: Close header but the phone just times out. With a browser, all is well. File-based (non mod_perl) content gets to the phone fine, it's only the mod_perl content that is timing out. I can see the requests coming and going in the logs. It looks like the data just never gets sent back to the phone.
I rewrote the handler as a stand-alone CGI.pm script and it works just fine.
Running:
Debian Sarge
Apache 2.0.52
mod_perl2
Any thoughts on this would be appreciated.
UPDATE:
I received a post on the mod_perl list concerning this suggesting that I double-check the headers. Here copies of the relavent posts:
Perrin,
My first inclination upon reading this post was "Silly, of course I checked the headers."
However, upon doing what you suggested by putting the CGI.pm script and mod_perl version side by side in lynx, the only difference was the following header:
Cache-Control: max-age=0 must-revalidate
I took that out and it works fine. Further inspection reveals that Cache-Control is apparently an HTTP1.1 feature. I replaced it with the HTTP1.0 'Pragma: no-cache' and that worked out fine.
Thank you so much for the suggestion. I'm sure it was suggested before, but perhaps I just needed to time away from it to look deeper.
Rodger
On Tue, 15 Mar 2005 22:25:10 -0500
Perrin <perrin@....> wrote:
> On Sat, 2005-03-12 at 18:25 -0500, Rodger Castle wrote:
> > I got around the immediate problem by a per-file <Location> directive
> > for the particular script in question and writing it with CGI.pm with
> > no problems.
>
> This almost certainly means that your mod_perl script is not sending out
> the right headers. Look at the complete response headers using GET or
> lynx or something and compare them to see what's missing in your
> mod_perl script.
>
> - Perrin
>
>
edited by demerphq to give perrin some privacy.