Re: svn commit: r1406719 - in /httpd/httpd/trunk: CHANGES docs/log-message-tags/next-number include/http_core.h server/core.c server/protocol.c

2012-11-17 Thread Stefan Fritsch
On Friday 16 November 2012, Roy T. Fielding wrote:
 FWIW, I don't think any of this should be configurable.
 HTTP/0.9 is on the chopping block -- it cannot be reasonably
 supported on networks today because routing is based on the
 Host header field.  We should just delete all backasswards.

For 2.6/3.0, I agree. But for 2.4,  I would rather do it in steps. 
First add the directive, defaulting to 0.9 enabled. One or two 
versions later, change default to disabled. If it didn't cause any 
complaints, maybe remove 0.9 support completely some time later.

 HTTP/1.x must be supported to be 1.1 compliant and there is no
 point in allowing configuration of support for future protocols
 when we have nothing capable of processing those protocols.
 Only new protocol modules can determine what else is supported.

About the newer versions, I am not sure about the use cases either. We 
could remove the upper limit and only have a minimum allowed version.

But AFAICS, disabling 1.0 is only good for Graham's use case. It could 
also be done with

If ! -T %{IS_SUBREQ}  %{SERVER_PROTOCOL} = 'HTTP/1.0'
Require all denied
/If

If that is good enough for the rather exotic use case, we could go 
back to a simple flag to enable/disable 0.9.

NB: The IS_SUBREQ part is necessary because some sub requests set r-
protocol to INCLUDED. This could be avoided if we expose r-
proto_num in the expression parser. That one seems to be preserved 
across sub requests and it also would make checking against a range of 
versions easier:

If %{SERVER_PROTOCOL_NUM} -lt 1001
Require all denied
/If

Graham, what do you think?

Cheers,
Stefan


Re: svn commit: r1409924 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS configure.in docs/manual/ include/httpd.h modules/generators/mod_status.c server/util.c

2012-11-17 Thread Ruediger Pluem


j...@apache.org wrote:
 Author: jim
 Date: Thu Nov 15 18:49:17 2012
 New Revision: 1409924
 
 URL: http://svn.apache.org/viewvc?rev=1409924view=rev
 Log:
* core: Add in ap_get_sload() and ap_get_loadavg().
 
 
 Modified:
 httpd/httpd/branches/2.4.x/   (props changed)
 httpd/httpd/branches/2.4.x/CHANGES
 httpd/httpd/branches/2.4.x/STATUS
 httpd/httpd/branches/2.4.x/configure.in
 httpd/httpd/branches/2.4.x/docs/manual/   (props changed)
 httpd/httpd/branches/2.4.x/include/httpd.h
 httpd/httpd/branches/2.4.x/modules/generators/mod_status.c
 httpd/httpd/branches/2.4.x/server/util.c
 
 Propchange: httpd/httpd/branches/2.4.x/

 
 Modified: httpd/httpd/branches/2.4.x/include/httpd.h
 URL: 
 http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/include/httpd.h?rev=1409924r1=1409923r2=1409924view=diff
 ==
 --- httpd/httpd/branches/2.4.x/include/httpd.h (original)
 +++ httpd/httpd/branches/2.4.x/include/httpd.h Thu Nov 15 18:49:17 2012
 @@ -1299,6 +1299,36 @@ struct server_rec {
  };
  
  /**
 + * @struct ap_sload_t
 + * @brief  A structure to hold server load params
 + */
 +typedef struct ap_sload_t ap_sload_t;
 +struct ap_sload_t {
 +/* percentage of process/threads ready/idle (0-100)*/
 +int idle;
 +/* percentage of process/threads busy (0-100) */
 +int busy;
 +/* total bytes served */
 +apr_off_t bytes_served;
 +/* total access count */
 +unsigned long access_count;
 +};
 +
 +/**
 + * @struct ap_loadavg_t
 + * @brief  A structure to hold various server loadavg
 + */
 +typedef struct ap_loadavg_t ap_loadavg_t;
 +struct ap_loadavg_t {
 +/* current loadavg, ala getloadavg() */
 +float loadavg;
 +/* 5 min loadavg */
 +float loadavg5;
 +/* 15 min loadavg */
 +float loadavg15;
 +};
 +
 +/**
   * Get the context_document_root for a request. This is a generalization of
   * the document root, which is too limited in the presence of mappers like
   * mod_userdir and mod_alias. The context_document_root is the directory
 @@ -2167,6 +2197,18 @@ AP_DECLARE(void *) ap_realloc(void *ptr,
 AP_FN_ATTR_WARN_UNUSED_RESULT
 AP_FN_ATTR_ALLOC_SIZE(2);
  
 +/**
 + * Get server load params
 + * @param ld struct to populate: -1 in fields means error
 + */
 +AP_DECLARE(void) ap_get_sload(ap_sload_t *ld);
 +
 +/**
 + * Get server load averages (ala getloadavg)
 + * @param ld struct to populate: -1 in fields means error
 + */
 +AP_DECLARE(void) ap_get_loadavg(ap_loadavg_t *ld);
 +
  
  #define AP_NORESTART APR_OS_START_USEERR + 1

Don't we need a minor bump because of these additional structures / functions?

Regards

RĂ¼diger



Re: svn commit: r1410459 - in /httpd/httpd/trunk: docs/log-message-tags/next-number server/mpm/event/event.c server/mpm/eventopt/eventopt.c

2012-11-17 Thread Ruediger Pluem


j...@apache.org wrote:
 Author: jim
 Date: Fri Nov 16 16:49:31 2012
 New Revision: 1410459
 
 URL: http://svn.apache.org/viewvc?rev=1410459view=rev
 Log:
 fdq expects a certain behavior from atomics... ensure that
 the event mpms check this.
 
 Modified:
 httpd/httpd/trunk/docs/log-message-tags/next-number
 httpd/httpd/trunk/server/mpm/event/event.c
 httpd/httpd/trunk/server/mpm/eventopt/eventopt.c
 

 Modified: httpd/httpd/trunk/server/mpm/event/event.c
 URL: 
 http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=1410459r1=1410458r2=1410459view=diff
 ==
 --- httpd/httpd/trunk/server/mpm/event/event.c (original)
 +++ httpd/httpd/trunk/server/mpm/event/event.c Fri Nov 16 16:49:31 2012
 @@ -2928,6 +2928,18 @@ static int event_pre_config(apr_pool_t *
  }
  ++retained-module_loads;
  if (retained-module_loads == 2) {
 +int i;
 +static apr_uint32_t foo = 0;
 +
 +apr_atomic_inc32(foo);
 +apr_atomic_dec32(foo);
 +apr_atomic_dec32(foo);
 +i = apr_atomic_dec32(foo);
 +if (i = 0) {

Why can we expect i  0? apr_atomic_dec32 returns 0 if the dec causes foo to 
become zero and it returns non zero
otherwise. Shouldn't this behavior the same across all platforms? And if not 
should that be fixed in APR?

 +ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL, APLOGNO(02405)
 + atomics not working as expected);
 +return HTTP_INTERNAL_SERVER_ERROR;
 +}
  rv = apr_pollset_create(event_pollset, 1, plog,
  APR_POLLSET_THREADSAFE | APR_POLLSET_NOCOPY);
  if (rv != APR_SUCCESS) {
 


Regards

RĂ¼diger


Re: Volunteers to drive an MSI build

2012-11-17 Thread Issac Goldstand


Program Files vs. drive root

PF pros
everything in there is protected from users other than admin
PF cons
everything in there is protected from users other than admin which
In Vista/7/8 the administrator account is disabled but you can run
things as admin if your user has admin privileges.
mostly causes problems with configuring and seeing any changes in htdocs
(because they really go to the virtual store)
pid file and logs cannot be written in some cases.


Why not go the IIS route and use a c:\wwwroot or the like for non 
program-file stuff (logs, cgi-bin, docs, htdocs, conf)?


  Issac



2.4.3 running on mail-archives us / server-status problem

2012-11-17 Thread Rainer Jung
Hi,

I updated the first ASF web server from 2.4.1 to 2.4.3. It is running
the service for mail-archives.apache.org in US, so you can reach it via
mail-archives.us.apache.org. It is being proxied by www.apache.org.

One strange thing: the /server-status directly tells us it has about 80
process running (it is prefork MPM), but after the fifth entry in the
extended status part the table stops. It seems the iteration through the
scoreboard is incomplete.

Anyone ever has seen this?

Will have a look at the code ...

Regards,

Rainer


Re: 2.4.3 running on mail-archives us / server-status problem

2012-11-17 Thread Rainer Jung
On 17.11.2012 22:12, Rainer Jung wrote:
 Hi,
 
 I updated the first ASF web server from 2.4.1 to 2.4.3. It is running
 the service for mail-archives.apache.org in US, so you can reach it via
 mail-archives.us.apache.org. It is being proxied by www.apache.org.
 
 One strange thing: the /server-status directly tells us it has about 80
 process running (it is prefork MPM), but after the fifth entry in the
 extended status part the table stops. It seems the iteration through the
 scoreboard is incomplete.
 
 Anyone ever has seen this?

Source indicates that this is due to access count on those processes
being 0. Since traffic on that one isn't to high and CPU in fact is 0 on
all but these 5 processes, this seems to be a consistent explanation.

Regards,

Rainer



Re: Volunteers to drive an MSI build

2012-11-17 Thread Yehuda Katz
On Sat, Nov 17, 2012 at 10:59 AM, Issac Goldstand mar...@beamartyr.netwrote:

 Why not go the IIS route and use a c:\wwwroot or the like for non
 program-file stuff (logs, cgi-bin, docs, htdocs, conf)?


That is similar to what the Debian package maintainers do (see
http://wiki.apache.org/httpd/DistrosDefaultLayout).
I just wonder if it is really a good idea to have the official builds put
the folders in a different place than building from source.
The only other official binary for 2.4 is for Netware and there is no
documentation on the wiki page if the layout is different.

If you are looking for the place for data, the correct place for conf,
logs, and maybe cgi-bin would be in a subfolder in %PROGRAMDATA%
(PROGRAMDATA is usually C:\ProgramData\).
(That is where MySQL builds appear to put their data too.)
I would say that htdocs should be in a subfolder %PUBLIC%.
See this MSDN blog post for more info:
http://blogs.msdn.com/b/cjacks/archive/2008/02/05/where-should-i-write-program-data-instead-of-program-files.aspx

Other notes about this proposal:

 The trick to this would be that some people enable mod_userdir in a way
 the will cause overlap and potential security issues:
 UserDir C:/Users/*/Website
 If htdocs is in C:\Users\Public\Website, then Location(Match) rules
 would proably not apply to it if accessed as ~public, which is a security
 problem)