[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-httpd-users
Subject: Re: problem with filters and dynamic content
From: Craig Sebenik <craig () netapp ! com>
Date: 2002-06-30 0:06:30
[Download RAW message or body]
More details:
using apache 2.0.39 on solaris 2.7
built with the following options:
_CONFIG_OPTS=" --prefix=$_INST_DIR
--with-layout=Apache
--enable-proxy
--enable-proxy-http
--enable-expires
--enable-headers
--enable-usertrack
--enable-unique-id
--enable-info
--enable-cgi
--enable-cgid
--enable-vhost-alias
--enable-speling
--enable-rewrite
--enable-ext-filter
"
Quoting Craig Sebenik (craig@netapp.com):
> Quoting Ryan Bloom (rbb@covalent.net):
> > There isn't enough information here to actually answer your question.
>
> My apologies.. some times things seem SOO obvious to you you forget that
> not everyone has been staring at the same code for the past week. :)
>
>
> > There is no reason that the filter wouldn't work from the face of it, so
> > at this point it depends on configuration and on the way the filter is
> > written. The first thing to try is to make sure that the filter is
> > actually added to the proxy for the CGI request
>
> The filter is not applied to the CGI output, but is applied to static. I
> forgot to mention that it is an "external filter", which I do realize is
> "experimental". It is working for 90% of the site, it just isn't working
> for the proxied content. (I do have other, less desirable, options
> available and I do have a couple of days... so no pressure and no "big"
> hurry. :> )
>
>
> > What does the filter actually do?
>
> The filter parses XML data and applies a "look and feel". Kind of
> templating solution. (I do realize that there are a TON of other options
> availble.) I have removed almost all of the code to boil things down to
> the basics.
>
>
> > Can you send me the code so that I
> > can vet the filter quickly?
>
> The filter code (test-out.pl)
>
> #!/tool/http/bin/perl -I/tool/http/lib/perl
> print "<!-- the test filter is applied .... -->\n";
> undef $/;
> print <STDIN>;
> # End of file.
>
> The apache config opts:
>
> ExtFilterDefine test-out mode=output intype=text/html outtype=text/html \
> cmd="/path/to/filter/test-out.pl"
>
> <location /EXIT/>
> ProxyPass http://exit.hq.netapp.com/
> ProxyPassReverse http://exit.hq.netapp.com/
> SetOutputFilter test-out
> ExtFilterOptions DebugLevel=1
> </location>
>
>
> The first couple lines of output follow. Obvisouly, "dy.cgi" is a CGI,
> while "st.html" is a normal static html file. (The headers remain more or
> less the same as what I had in the original message.)
>
>
> exit:~> GET craig-devel/EXIT/t/dy.cgi | head -3
> <!DOCTYPE html
> PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "DTD/xhtml1-transitional.dtd">
>
>
> exit:~> GET craig-devel/EXIT/t/st.html | head -3
> <!-- the test filter is applied .... -->
> <na:param pdf-link='file.pdf' size='987M'/>
> <na:header
>
>
> My apologies (in advance) is there something obviously wrong or you still
> do not have enough data...
>
> Just let me know what else you need.
>
> (Thanx for the quick response. :> )
>
>
> Craig.
>
>
>
>
>
>
> >
> > Ryan
> >
> > ----------------------------------------------
> > Ryan Bloom rbb@covalent.net
> > 645 Howard St. rbb@apache.org
> > San Francisco, CA
> >
> > > -----Original Message-----
> > > From: Craig Sebenik [mailto:craig@netapp.com]
> > > Sent: Friday, June 28, 2002 5:00 PM
> > > To: users@httpd.apache.org
> > > Subject: problem with filters and dynamic content
> > >
> > > I am having a problem using an output filter with "dynamic" data
> > returned
> > > from a proxy.
> > >
> > > The relevant pieces of the config;
> > >
> > > <location /SERVER/>
> > > ProxyPass http://some-server/
> > > ProxyPassReverse http://some-server/
> > > SetOutputFilter filter-out
> > > ExtFilterOptions DebugLevel=9
> > > </location>
> > >
> > > I have a static file and a CGI. The CGI does not return the same
> > headers
> > > as the static file:
> > >
> > >
> > > static file:
> > >
> > > 200 OK
> > > Connection: close
> > > Date: Fri, 28 Jun 2002 23:38:59 GMT
> > > Accept-Ranges: bytes
> > > Server: Apache/1.3.22 (Unix) AxKit/1.5 mod_perl/1.26 mod_ssl/2.8.5
> > > OpenSSL/0.9.6a
> > > Content-Length: 9451
> > > Content-Type: text/html; charset=ISO-8859-1
> > > ETag: "b547-22f-3d1cf32c"
> > > Last-Modified: Fri, 28 Jun 2002 23:37:16 GMT
> > > Client-Date: Fri, 28 Jun 2002 23:38:30 GMT
> > > Client-Peer: 10.10.20.140:80
> > >
> > >
> > > CGI:
> > >
> > > 200 OK
> > > Connection: close
> > > Date: Fri, 28 Jun 2002 23:40:05 GMT
> > > Server: Apache/1.3.22 (Unix) AxKit/1.5 mod_perl/1.26 mod_ssl/2.8.5
> > > OpenSSL/0.9.6a
> > > Content-Type: text/html; charset=ISO-8859-1
> > > Client-Date: Fri, 28 Jun 2002 23:39:35 GMT
> > > Client-Peer: 10.10.20.140:80
> > >
> > >
> > > (Remember, this is being passed thru a proxy, apache 2.0.39, which
> > then
> > > applies the filter.)
> > >
> > > The filter works for the static page but does not work for the CGI.
> > >
> > > Is it the fact that the "content-length" is missing? Or maybe the
> > "ETag"?
> > >
> > > How can I fix this? (I need the filter to be applied to the output
> > from
> > > the CGI on the back-end server.)
> > >
> > > Altering the CGI is not possible. (For a lot of reasons that I won't
> > go
> > > into.)
> > >
> > >
> > > TIA!
> > >
> > > Craig
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic