Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigC.pm

2004-03-06 Thread Stas Bekman
[EMAIL PROTECTED] wrote:
coar2004/03/05 08:54:19
  Modified:perl-framework/Apache-Test/lib/Apache TestConfigC.pm
  Log:
  too many assumptions that things will stay the same

  -if ($dversion eq '-DAPACHE1') {
  +if ($dversion =~ 'APACHE1') {
Well dversion is generated by A-T and it's -D APACHE$self-{rev}, why taking 
chances and match partial strings? What assumptions are you talking about, 
when both live inside the same package.

And it seems to be awkward at all, since what you are really after is:
  if ($self-server-{rev} == 1)
perhaps add an accessor:
  sub rev { shift-{rev} }
in TestServer.pm to make it nicer. Now you need to make no assumptions.
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: ftp site

2004-03-06 Thread Ben Laurie
Ghanta, Bose wrote:

Dear Ben and OpenSSL Team members,

  Could you kindly answer the following question from one of my group
members?  I very much appreciate it.
 I was working on what I originally thought was a bug in our FTP client.
Your ftp site has a very long banner (due to the crypto warnings and what
all), and the bug opened against our FTP client was that it would disconnect
partly through the login banner.  After using a packet sniffer, I determined
that what is happening is that at a certain point, as your FTP server is
sending banner lines, it drops the connection.  I'm suspecting it's not
doing so gracefully, as I'm seeing a TCP/IP RST segment, not a FIN segment.
I'm wondering if you can put me in touch with whoever runs your network
servers, so we can get to the bottom of this.  It doesn't happen from linux
or win2000 boxes here, so I'm suspecting it's something about the way our
TCP/IP stack is ACK'ing incoming segments from your FTP server.  It may be a
bug in your TCP/IP stack that's only triggered in a rare case.  Please let
me know how you'd like to proceed.
What does this question have to do with us?

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html   http://www.thebunker.net/
There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit. - Robert Woodruff


[EXPERIMENTAL PATCH] to mod_cache

2004-03-06 Thread Bill Stoddard
Configure mod_mem_cache to cache files in mem, set CacheExpiresMax 1 then turn ab loose fetching a single 
cachable static file and watch what happens.  You get exploding memory usage in the subprocess_env serialized 
headers.

The initial cache load caches whatever is in subprocess_env.  On the next request, mod_cache discovers that 
the cache entry is stale, but by the time it has figured out that it needs to DECLINE the request, it has 
replaced r-subprocess_env with what was in the stale cache entry. Whatever is in the subprocess_env table 
when the quick handler DECLINES stays there and new entries are added by Apache during normal (uncached) file 
handling. The result is that when the cache_in_filter is run to cache the new response, subprocess_env 
contains the values out of the stale cache entry -and- the new values added by default_handling.  When the new 
cache entry becomes stale, the cycle starts again and sunprocess_env grows more.

I really don't have much time to pursue this so here is a patch that:
1. saves some tables of interest from the request_rec at entry to the cache_handler. These value are restored 
if the cache_handler DECLINES

2. Hacks out a bunch of code that I cannot quite grok and that I am pretty sure is causing more problems that 
it is solving.

mod_cache needs some serious work before it is ready to come out of experimental.

Bill

RCS file: /cvs/phoenix/2.0.47/modules/experimental/mod_cache.c,v
retrieving revision 1.2
diff -u -r1.2 mod_cache.c
--- mod_cache.c 5 Mar 2004 02:33:46 -   1.2
+++ mod_cache.c 6 Mar 2004 21:11:23 -
@@ -57,6 +57,12 @@
 cache_info *info = NULL;
 cache_request_rec *cache;
 cache_server_conf *conf;
+/* Hack till we come up with a better solution */
+
+apr_table_t *err_headers_out = r-err_headers_out;
+apr_table_t *notes = r-notes;
+apr_table_t *subprocess_env = r-subprocess_env;
+apr_table_t *headers_out = r-headers_out;
 conf = (cache_server_conf *) ap_get_module_config(r-server-module_config,
   cache_module);
@@ -151,18 +157,7 @@
  */
 rv = cache_select_url(r, cache-types, url);
-if (DECLINED == rv) {
-if (!lookup) {
-/* no existing cache file */
-ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
- cache: no cache - add cache_in filter and DECLINE);
-/* add cache_in filter to cache this request */
-ap_add_output_filter_handle(cache_in_filter_handle, NULL, r,
-r-connection);
-}
-return DECLINED;
-}
-else if (OK == rv) {
+if (OK == rv) {
 /* RFC2616 13.2 - Check cache object expiration */
 cache-fresh = ap_cache_check_freshness(cache, r);
 if (cache-fresh) {
@@ -174,127 +169,69 @@
 return OK;
 }
 rv = ap_meets_conditions(r);
-if (rv != OK) {
+if (rv == OK) {
+/* Meets conditions or is not conditional */
 ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
- cache: fresh cache - returning status %d, rv);
-return rv;
-}
+ cache: fresh cache - add cache_out filter and 
+ handle request);
-/*
- * Not a conditionl request. Serve up the content
- */
-ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r-server,
- cache: fresh cache - add cache_out filter and 
- handle request);
+/* We are in the quick handler hook, which means that no output
+ * filters have been set. So lets run the insert_filter hook.
+ */
+ap_run_insert_filter(r);
+ap_add_output_filter_handle(cache_out_filter_handle, NULL,
+r, r-connection);
-/* We are in the quick handler hook, which means that no output
- * filters have been set. So lets run the insert_filter hook.
- */
-ap_run_insert_filter(r);
-ap_add_output_filter_handle(cache_out_filter_handle, NULL,
-r, r-connection);
-
-/* kick off the filter stack */
-out = apr_brigade_create(r-pool, c-bucket_alloc);
-if (APR_SUCCESS
-!= (rv = ap_pass_brigade(r-output_filters, out))) {
-ap_log_error(APLOG_MARK, APLOG_ERR, rv, r-server,
- cache: error returned while trying to return %s 
- cached data,
- cache-type);
-return rv;
+/* kick off the filter stack */
+out = apr_brigade_create(r-pool, c-bucket_alloc);
+rv = 

Total Accesses KB Transfer..

2004-03-06 Thread Esteban Pizzini
Hi,

Is there a quickly way to obtain total accesses and KB transfer??? I have
been looking in mod_status and it uses two cycles to obtain the values of
each process and thread... then it sums it and gets the total values.
but I try it , and appears to take some seconds when there are some
processes.

I need to obtain that values from a module... and Id like to know if  is
there a faster way to obtain that values..

Thank You!!!
EP




Re: FreeBSD 4.x and Apache2: worker MPM issue

2004-03-06 Thread Marc G. Fournier
On Tue, 2 Mar 2004, Justin Erenkrantz wrote:

 I also know that I checked this a few months ago on minotaur (ASF's CVS
 server), which is running 4.9-STABLE (from Nov 29 2003).  So, if it got
 fixed, it's probably after that as it was still broken then.

Actually, I think it might have been fixed ... On my Jan 6th FreeBSD
server, I am getting weird responses with threading enabled, but two of my
others ones (Jan 23rd nd Feb 4th) both seem to be working consistently ...

At least so far ... the two that are working consistently have been
running:

2 days 4 hours 16 minutes 25 seconds

and

3 days 49 minutes 47 seconds




Marc G. Fournier   Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED]   Yahoo!: yscrappy  ICQ: 7615664