You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Peter Janovsky <pe...@yahoo.com> on 2010/09/14 15:15:43 UTC
ap_sub_req_lookup_file vs ap_sub_req_lookup_uri
when using ap_sub_req_lookup_file to concatenate the contents of two files only
the contents of the first file are delivered in the response. alternatively if
i use ap_sub_lookup_uri to concatenate the contents of two web pages, the
aggregated content is delivered in the response. what is the difference between
using ap_sub_req_lookup_file and ap_sub_req_lookup_uri? should you use
ap_sub_req_lookup_file to determine the file's existence and only if you are
delivering one file in the response? how do you concatenate the contents of two
or more files on your local drive? thank you for your help.
peter
Re: ap_sub_req_lookup_file vs ap_sub_req_lookup_uri
Posted by Peter Janovsky <pe...@yahoo.com>.
apache 2.2.16
________________________________
From: Ben Noordhuis <in...@bnoordhuis.nl>
To: modules-dev@httpd.apache.org
Sent: Wed, September 15, 2010 4:03:40 PM
Subject: Re: ap_sub_req_lookup_file vs ap_sub_req_lookup_uri
Peter, what version of Apache are you testing this with?
Re: ap_sub_req_lookup_file vs ap_sub_req_lookup_uri
Posted by Ben Noordhuis <in...@bnoordhuis.nl>.
Peter, what version of Apache are you testing this with?
Re: ap_sub_req_lookup_file vs ap_sub_req_lookup_uri
Posted by Peter Janovsky <pe...@yahoo.com>.
i notice mod_include is implemented as a filter. is this the preferred way to
implment ap_sub_req_lookup_file? currently i implement ap_sub_req_lookup_file
within a handler responsible for calling the appropriate files. within the
handler i only have access to the output_filters, input_filters,
proto_output_filters and proto_input_filters variables in the request_rec as it
is not included in a filter chain including any of these variables in the
ap_sub_req_lookup_file call does not contcatenate the files.
when performing subrequests to concatenate content do you need to run the filter
chain?
________________________________
From: Ben Noordhuis <in...@bnoordhuis.nl>
To: modules-dev@httpd.apache.org
Sent: Tue, September 14, 2010 1:17:43 PM
Subject: Re: ap_sub_req_lookup_file vs ap_sub_req_lookup_uri
You call it with next_filter=NULL instead of f->next? That'll skip the
regular filter chain, probably not what you want.
Re: ap_sub_req_lookup_file vs ap_sub_req_lookup_uri
Posted by Ben Noordhuis <in...@bnoordhuis.nl>.
You call it with next_filter=NULL instead of f->next? That'll skip the
regular filter chain, probably not what you want.
Re: ap_sub_req_lookup_file vs ap_sub_req_lookup_uri
Posted by Peter Janovsky <pe...@yahoo.com>.
ben,
thank you for pointing me in the right direction. the only difference i see
between my call(s) to ap_sub_req_lookup_file and the call(s) within mod_include
is the inclusion of the filter parameter. maybe my understanding of filters is
incorrect. are filters only used to modify response content or are filters
required to concatenate subrequest content for the response?
peter
________________________________
From: Ben Noordhuis <in...@bnoordhuis.nl>
To: modules-dev@httpd.apache.org
Sent: Tue, September 14, 2010 9:39:39 AM
Subject: Re: ap_sub_req_lookup_file vs ap_sub_req_lookup_uri
ap_sub_req_lookup_file() should work, it's what mod_include uses when
you have <!--#include file="/foo/bar"--> on your page. You might want
to take a look at its source.
Re: ap_sub_req_lookup_file vs ap_sub_req_lookup_uri
Posted by Ben Noordhuis <in...@bnoordhuis.nl>.
ap_sub_req_lookup_file() should work, it's what mod_include uses when
you have <!--#include file="/foo/bar"--> on your page. You might want
to take a look at its source.