Re: Fixing GetStreamSize w/Linux + Apache 1.0.5

Mark Brown (mbrown@OpenMarket.com)
Fri, 05 Jul 1996 18:16:35 -0400

Message-Id: <199607052216.SAA27276@breckenridge.openmarket.com>
To: fastcgi-developers@OpenMarket.com
Subject: Re: Fixing GetStreamSize w/Linux + Apache 1.0.5 
In-Reply-To: David Sklar's message of "Wed, 03 Jul 1996 08:43:32 EDT."
             <Pine.LNX.3.91.960703084115.26938A-100000@juan-epstein.student.net> 
Date: Fri, 05 Jul 1996 18:16:35 -0400
From: Mark Brown <mbrown@OpenMarket.com>


David Sklar asks:

    So all over http://www.fastcgi.com it tells me that I need to change 
    GetStreamSize to use fastcgi with Linux and Apache < 1.1. Yet it doesn't 
    tell me how.  I've poked through many header files, but I can't find the 
    proper element of the FILE structure to replace in the line

        return fp->_cnt;

    in mod_fastcgi.c.

    Any thoughts?

I'm not familiar with Linux and don't have ready access to
Linux here.

Take a look at the logic being used in getc to decide when the FILE
buffer is empty.  If there isn't a count in the FILE, most likely there
is a pointer to the current byte and a pointer to the last byte + 1.
The difference of these is the count.

    --mark