CGI Strangeness browser issues
Posted: 2013-05-08 10:05am
I have a perl cgi program that goes to a directory and counts the number of lines in a file and returns a plain text page with that number.
The file is being written to by a c program (with the output fflushed after each write), and so is getting longer over time; the cgi is a progress checker that is polling the file to see how far along it is. The cgi has no idea how long the file "should" be in the end.
When called from internet explorer the cgi immediately returns the page saying how many lines there are. This is exactly as desired.
The problem is that when called from chrome the cgi waits until the file is complete, and then returns the number, thus totally defeating the point of a progress checker.
Debugging indicates that something impossible like chrome calling the cgi multiple times automatically is not happening.
Does anyone have any idea how and why the exact same program executed on the same computer can behave differently when told to run by different browsers?
The file is being written to by a c program (with the output fflushed after each write), and so is getting longer over time; the cgi is a progress checker that is polling the file to see how far along it is. The cgi has no idea how long the file "should" be in the end.
When called from internet explorer the cgi immediately returns the page saying how many lines there are. This is exactly as desired.
The problem is that when called from chrome the cgi waits until the file is complete, and then returns the number, thus totally defeating the point of a progress checker.
Debugging indicates that something impossible like chrome calling the cgi multiple times automatically is not happening.
Does anyone have any idea how and why the exact same program executed on the same computer can behave differently when told to run by different browsers?