generators

Checkout Tools
  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
* modules/generators/cgi_common.h (cgi_handle_request): Catch

(unlikely) apr_bucket_read() failure when reading request.

* modules/generators/cgi_common.h (cgi_handle_request): Factor out

near-identical common code from mod_cgid, mod_cgi.

* modules/generators/mod_cgid.c (cgid_handler),

modules/generators/mod_cgi.c (cgi_handler):

Adjust to use cgi_handle_request.

Github: closes #97

PR62989: DOCTYPE tags in server-generated HTML.

Submitted By: Andra Farkas <deepbluemistake gmail.com>, Giovanni Bechis <giovanni paclan.it>

  1. … 10 more files in changeset.
Add comment, no functional change.
Fix build broken w/o --enable-cgid-fdpassing by r1867968:

* modules/generators/cgi_common.h: Only define CGI bucket type

if WANT_CGI_BUCKET is defined.

* modules/generators/mod_cgi.c: Always include cgi_common.h, defining

WANT_CGI_BUCKET iff APR_FILES_AS_SOCKETS is defined

* modules/generators/mod_cgid.c: Always include cgi_common.h, defining

WANT_CGI_BUCKET iff HAVE_CGID_FDPASSING (--enable-cgid-fdpassing).

* modules/generators/cgi_common.h (discard_script_output): Simplify

slightly and ensure constant rather than unlimited memory

consumption when discarding CGI script output (for e.g. a redirect

response).

Move common (and near-identical) code for CGI response output handling

to cgi_common.h; the diff between the modules for this code was as

follows:

https://people.apache.org/~jorton/mod_cgi-to-cgid-handler.diff

Change from previous: mod_cgi will now explicitly discard output when

returning HTTP_MOVED_TEMPORARILY for relative redirects (should not be

functionally different), TRACE1 logging of ap_pass_brigade failures

for mod_cgid is dropped.

* modules/generators/cgi_common.h (cgi_handle_response): New function,

factored out from mod_cgid.

(discard_script_output): Copied function from mod_cgi/d unchanged.

* modules/generator/mod_cgid.c (cgid_handler),

modules/generator/mod_cgi.c (cgi_handler): Use cgi_handle_response.

* modules/generators/cgi_common.h (cgi_bucket_create):

Disable APR timeout handling here for all callers.

* modules/generators/mod_cgi.c (cgi_handler): ... drop it here.

* modules/generators/mod_cgid.c (sock_readhdr): Only set up control

message block when required; add some additional error handling.

mod_cgid: Continuation of r1862968, experimental fd passing support.

Split out CGI bucket implementation from mod_cgi and use in both

mod_cgi and mod_cgid, bringing stderr handling in mod_cgid up to par

with mod_cgi. (There is a lot of code which has been copied between

mod_cgi{,d} so there's scope for further reduction of source

duplication between the modules using this header)

* modules/generators/cgi_common.h: Copied from mod_cgi.c, removed

everything but the CGI bucket implementation with only one change:

(struct cgi_bucket_data, cgi_bucket_create, cgi_bucket_read): Take a

timeout on bucket creation, store and use on reads.

* modules/generators/mod_cgi.c [APR_FILES_AS_SOCKETS]: Include

cgi_common.h.

(cgi_handler): Pass configured timeout to CGI bucket.

* modules/generators/mod_cgid.c: Include cgi_common.h.

(log_script_err): Copy from mod_cgi.c.

(log_script): Use log_script_err.

(send_req): Take fd for stderr.

(cgid_child_errfn): Handle fd-passing case by writing error

to stderr for client to pass through ap_log_rerror.

(cgid_handler): Create pipe for stderr, pass write-end to

server via send_req, use read-end to create CGI bucket. Handle

stderr output in failure paths.

PR: 54221

  1. … 1 more file in changeset.
Add experimental support for fd passing in mod_cgid. Attaches CGI

script stderr to the error log specific to the vhost, by passing the

appropriate fd over the AF_UNIX socket from the request handling

thread to the cgid server process.

* modules/generators/config5.m4: Add --enable-cgid-fdpassing.

* modules/generators/mod_cgid.c (sock_readhdr): New function, also

returns auxiliary control data (the stderr fd) if available.

(sock_write): Take optional aux fd argument, send it as control

data. (send_req, get_req): Adjust accordingly to pass/receive the

stderr fd.

(cgid_server): Use passed fd if available, limit the lifetime.

PR: 60692

Fix wrong use of ap_rputs with formats.

Use ap_rprintf instead.

It seems noone has PIPE_BUF defined.

Use APR apr_time_as_msec() macro for conversion

from apr_time_t to milliseconds instead of

hard-coded division by 1000.

mod_status: Cumulate CPU time of exited child

processes in the "cu" and "cs" values.

Add CPU time of the parent process to the

"c" and "s" values.

  1. … 5 more files in changeset.
mod_status: Add cumulated response duration time

in milliseconds.

  1. … 4 more files in changeset.
mod_status: Complete the data shown for async

MPMs in "auto" mode. Added number of processes,

number of stopping processes and number

of busy and idle workers.

  1. … 1 more file in changeset.
Fix PR54848 in a 2.4.x backportable format. Ideally deprecating the use

of ->client in whatever version of 2.4 this is added into would be

more logical.

  1. … 6 more files in changeset.
* modules/generators/mod_info.c: Constify fixed tables and mark

module-private global variables static. No functional change.

PR62229: add CGIScriptTimeout to mod_cgi

add CGIScriptTimeout to mod_cgi, like mod_cgid's CGIDScriptTimeout.

Not addressed: making CGIScriptTimeout name work for either module.

Submitted By: Hank Ibell <hwibell gmail.com>

Committed By: covener

  1. … 1 more file in changeset.
PR 61980: AH01215 CGI stderr forwarding msg improvement

*) mod_cgi: Improve AH01215 messages to make it more clear that the message is

the CGI scripts stderr output. PR 61980. [Hank Ibell <hwibell gmail.com>]

Submitted By: Hank Ibell <hwibell gmail.com>

Commited By: covener

  1. … 1 more file in changeset.
Follow up to r1740928: including NOT_IN_PROXY in NOT_IN_DIR_LOC_FILE is both

incomplete and not backportable, fix it by introducing NOT_IN_DIR_CONTEXT and

restoring NOT_IN_DIR_LOC_FILE to its previous value.

Per ap_check_cmd_context(), NOT_IN_DIR_LOC_FILE actually/really means "not in

any directory context", while the definition itself does not include all the

existing directory contexts (e.g. <Limit>, or <Proxy> before r1740928).

This is a bit of a misnomer, at least, so instead of (ab)using it by adding the

missing contexts (in an incompatible way), let's define NOT_IN_DIR_CONTEXT to

really exclude all directory context (i.e. NOT_IN_DIR_LOC_FILE + NOT_IN_LIMIT +

NOT_IN_PROXY) and use it wherever NOT_IN_DIR_LOC_FILE was used.

This is by itself a major MMN bump (modules not compiled with this commit and

having directives checked against NOT_IN_DIR_LOC_FILE won't be caught the same

way by NOT_IN_DIR_CONTEXT in the new ap_check_cmd_context() code), but with the

below change, 2.4.x should work as before:

- if ((forbidden & NOT_IN_DIR_CONTEXT) == NOT_IN_DIR_CONTEXT) {

+ if ((forbidden & NOT_IN_DIR_LOC_FILE) == NOT_IN_DIR_LOC_FILE) {

if (cmd->path != NULL) {

return apr_pstrcat(cmd->pool, cmd->cmd->name, gt,

- " cannot occur within directory context", NULL);

+ " cannot occur within <Directory/Location/Files/Proxy> "

+ "section", NULL);

}

...

}

  1. … 7 more files in changeset.
httpdunit: merge to trunk from feature branch
  1. … 10 more files in changeset.
remove r1792169 taint checks from proxy and status modules

Both of these checks are problematic without further

work.

status: even a .htaccess with no SetHandler blocks the handler.

proxy: RewriteRule ... ... [P] in htaccess is blocked.

  1. … 1 more file in changeset.
Introduce request taint-checking concept.

  1. … 6 more files in changeset.
no strncasecmp because flag has no value

Use 'ap_cstr_casecmp' to simplify code.

Remove useless case. We know that to can not be NULL at this point.

Save a few bytes in the conf pool.

'push_item' and 'add_alt' already duplicate their parameters, so we can safely use the temp_pool here.

update comments post-r1787525

Add IndexOptions UseOldDateFormat

*) mod_autoindex: Add IndexOptions UseOldDateFormat to allow the date

format from 2.2 in the Last Modified column. PR60846.

PR34014 / r903052 changed date format for autoindex

Submitted By: Hank Ibell <hwibell gmail.com>

  1. … 2 more files in changeset.
Remove some spaces to synch with 2.4