Apache 2.0.40 appears to be caching requests

I have a Perl/CGI script where users enter a few details such as hostname, username etc and it FTP's files to the specified server.

This was running fine with Apache 1.3.x

What happens now is when the form is submitted, there is about 10 lines of output and then nothing else.  The script still runs in the background as I can see the activity with tcpdump.  The script essentially outputs data everytime a file is uploaded.

I use the Net::FTP module and have debugging turned on.  Looking in the web server logs, there are no entries while it FTP's the files and when it finishes, the webserver log is filled with all the debug output.  This all leads me to believe that Apache is caching the output, however I can not see any obvious configuration option to change this.

The Perl script has Perl's buffering turned off with $|=1;

Suggestions please.
LVL 48
Who is Participating?
I wear a lot of hats...


TintinAuthor Commented:
Will also add that I have no caching or proxy options enabled.
TintinAuthor Commented:
Another thing.  If I run the script from the command line, the output is continuous, ie: no buffering or caching.
TintinAuthor Commented:
I know I'm doing a lot of replies to myself, but I've managed to get the script to output correctly if I turn off debugging in Net::FTP

However, I'd still like to know why????
Cloud Class® Course: C++ 11 Fundamentals


TintinAuthor Commented:
I've read through the PAQ's you listed, but they all relating to caching and not the problem I had.

I probably should have used the term buffering rather than caching, as that is a more acurate description of the problem I was having.

Yes I do agree with you on the buffering problem.  Somehow, it might be happening to how apache might be caching the output (in memory maybe).  I do not have much technical knowledge to explain, but some people said that adding a custome header to the request may solve the problem.

<IfModule mod_headers.c>
Header set Pragma: no-cache
Header set Cache-control: "max-age=0, must-revalidate"
Header set Expires: "Sat 02 Apr 1977 17:15:00 GMT"

Perhaps you might want to give it a shot first (Apology if you'd already did try that).


Experts Exchange Solution brought to you by

Your issues matter to us.


Start your 7-day free trial
TintinAuthor Commented:
I'd forgotten about this question, but I didn't eventually find a solution (although I can't remember what I actually did).

I appreciate the effort, so I'm awarding the points anyway.
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.


Have a better answer? Share it in a comment.