proxy with a filter - hangs :(

This is a discussion on proxy with a filter - hangs :( within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi all! I would like to run a proxy with a filter on the proxied pages. But the filter seems ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-31-2003
modi
 
Posts: n/a
Default proxy with a filter - hangs :(

Hi all!

I would like to run a proxy with a filter on the proxied pages. But the
filter seems to hang. Any ideas ??

My configuration is as follows on windows XP:

----- httpd.conf -----
....
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule ext_filter_module modules/mod_ext_filter.so
....

ProxyRequests On
<Proxy *>
Order Deny,Allow
Deny from all
Allow from localhost
</Proxy>

ExtFilterDefine modifilter mode=output
cmd="F:/Programmer/j2sdk_NetBeans/j2sdk1.4.2/bin/java.exe -cp F:/\"Documents
and Settings\"/Modi/Dokumenter/dpProxy/Java/ filter"
SetOutputFilter modifilter
#ExtFilterOptions DebugLevel=1

----- httpd.conf -----

This configuration seems to be ok as the java program filter is run.

However the filter hangs:(

My simple test filter filter.java that just pipes the page looks like:
----- filter.java -----
....
String s = "";
try {
//BufferedReader in = new BufferedReader( /*Have tried buffering also*/
// new InputStreamReader(System.in));
InputStreamReader in = new InputStreamReader(System.in);

int myi =0;

int tc;

while (myi<10000){
if ((tc = in.read())!=-1)
s = s.concat(String.valueOf((char)tc));
myi++;
}
catch (
....
System.out.println("test:" + s);
....
----- filter.java -----

In the above code changing 10000 to ie 2000 makes the filter run ok - the
top the proxied page is returned. Somewhere above 2000 it hangs though and
throws no exception, and the limit seems to change between runs. Sometimes
5000 is ok - sometimes it is not :(

Btw. the ExtFilterOptions line seems to make apache fail to restart - so I
can't get further debugmessages.

Thanks for your help

Morten Iversen


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:40 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0