You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Greg Stein <gs...@lyra.org> on 2000/03/28 11:54:12 UTC

r->input (was: cvs commit: ...)

On Mon, 27 Mar 2000 rbb@apache.org wrote:
> > > > Content-generating modules should continue to use
> > > > ap_get_client_block() for reading,
> > > 
> > > no change was made to this part of the API.
> > 
> > Yes there was. Ryan introduced ap_setup_api(). That appears to be

oops. typo... yah, I meant ap_setup_input.

> > redundant to ap_setup_client_block().
> 
> No.  I added ap_setup_input, and it was totally separate from
> ap_setup_client_block.  All ap_Setup_input does, is check for a valid
> r->input, and if it isn't there, open the file pointed to by the
> request_rec.  Regardless, this change has been moved to outside of the
> module.  ap_invoke_handler can do this just fine.

Ah! This wasn't clear to me when I read the code. Didn't look at that part
close enough.

I mistakenly thought r->input referred to the *connection* input, rather
than the opened file.

Hrm. For generated sources or sources that don't map to a file-like API,
this isn't going to work. For example, mod_autoindex. That thing generates
the basic content of the response.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/


Re: r->input (was: cvs commit: ...)

Posted by Dean Gaudet <dg...@arctic.org>.
On Tue, 28 Mar 2000, Greg Stein wrote:

> Hrm. For generated sources or sources that don't map to a file-like API,
> this isn't going to work. For example, mod_autoindex. That thing generates
> the basic content of the response.

it could still set up an r->input, and use one of the asynchronous methods
to provide r->input data for another layer to process.

all dynamic data sources can be presented as a BUFF or an iol depending on
how you want to implement the interface.

mod_cgi just happens to be easy because you can stuff an iol_pipe into a
BUFF and you're done -- because it already runs in another process.

Dean


Re: r->input (was: cvs commit: ...)

Posted by rb...@apache.org.
> I mistakenly thought r->input referred to the *connection* input, rather
> than the opened file.
> 
> Hrm. For generated sources or sources that don't map to a file-like API,
> this isn't going to work. For example, mod_autoindex. That thing generates
> the basic content of the response.

That was why it was up to the module to call this function.  In cases
where the input was not needed, this was never called.  For example,
mod_cgi as it was committed never called this function.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------