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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |