in reply to Perl Output/Web Server Question

And what's the effect of putting $| = 0; at the top of my script? I thought that would have it output the header and top of the page, just to "keep the other script interested" kind of thing

Oops :-) What you wanted is $|=1; which enables autoflushing the output buffer. What you did disables the effect you wanted to achieve. (Actually, it made no difference since the default is to buffer).

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re: Perl Output/Web Server Question
by Cody Pendant (Prior) on Jan 27, 2002 at 07:03 UTC
    Thanks all for your help.

    I think I made a couple of mistakes, or wasn't clear, in the first post.

    Yes, dws, the question is "what causes the client to time out", and the client is, unfortunately, the script being run by AvantGo that I have no control over.

    But in answer to your other points, I did have $|=1; not zero, (mistake in posting, not scripting) and I did have little bits of output dribbling out as the script progressed to try and keep the other server interested.

    My "when does a web server know the script is finished" question should have been formulated "my web server seems to be signalling somehow earlier to the AvantGo client, in the new version, that it's finished, which doesn't make sense because it actually finishes, if anything, later than the old version, it just stops outputting HTML earlier."


    --
    Weaselling out of things is important. It's what separates us from the animals ... except the weasel.

      Reading again, I see something I overlooked before. The message you got from the AvantGo client is idle too long - not a timeout per se. I am guessing that the AvantGo client is still timing out in a way, except it doesn't complain because by that time, your output is complete. Even if that's not entirely correct: I think the answer is in how that client works. It may make uncommon assumptions.

      Makeshifts last the longest.