jerenkrantz in httpd

* CHANGES: Consolidate for humans who have to read this file.

Add directives to control two protocol options:

HttpContentLengthHeadZero - allow Content-Length of 0 to be returned on HEAD

HttpExpectStrict - allow admin to control whether we must see "100-continue"

This is helpful when using Ceph's radosgw and httpd.

Inspired by: Yehuda Sadeh <>


* include/http_core.h

(core_server_config): Add http_cl_head_zero and http_expect_strict fields.

* modules/http/http_filters.c

(ap_http_header_filter): Only clear out the C-L if http_cl_head_zero is not

explictly set.

* server/core.c

(merge_core_server_configs): Add new fields.

(set_cl_head_zero, set_expect_strict): New config helpers.

(HttpContentLengthHeadZero, HttpExpectStrict): Declare new directives.

* server/protocol.c

(ap_read_request): Allow http_expect_strict to control if we return 417.

* include/ap_mmn.h


* CHANGES: Add a brief description.

Vote for some backports for 2.4.x. (Not going anywhere near BI. *grin*)

Merge r1433861 from trunk (w/updated quickreference.html.en transforms).

Make documentation reflect reality of what the code does - in that LoadModule

and LoadFile can be declared inside a vhost configuration.

minfrin vetoed restricting LoadModule to server context as we do in 1.3.

See Message-ID: <>

* docs/manual/mod/mod_so.xml: Denote virtual host context.

* docs/manual/mod/mod_so.html.en, docs/manual/quickreference.html.en: Update


* content/docs-project/index.mdtext: Link to the build doc from the index.

Fix memory leak in mod_deflate.c when SetOutputFilter is enabled and DEFLATE

is the first filter in the chain - this is seen with mod_dav + mod_deflate

when the client can not do gzip and we constantly do the filter checks.

* modules/filters/mod_deflate.c

(deflate_ctx): Add a flag as to whether we are successfully initialized.

(deflate_out_filter): Always create filter ctx and set filter_init flag only

after we are successfully initialized.

* module-2.0/mod_mbox_out.c: ASCII-escape the text bodies to help lame parsers.

Fix up non-printable character support with Firefox and Google Chrome

over AJAX interfaces.

For a test case, try lists with rpluem as a member - April 2010 of dev@httpd

is a good example:

* CHANGES: Note this.

* module-2.0/mod_mbox.c

(apr_lib.h): Include.

(mbox_ascii_escape): Add helper to just HTML-ify non-printable chars based

on ap_escape_html2 implementation.

* module-2,0/mod_mbox.h

(mbox_ascii_escape): Declare.

(ESCAPE_OR_BLANK): If available, use ap_escape_html2 or use our internal

escape helper on pre-2.3 builds.

(URI_ESCAPE_OR_BLANK): Relocate declaration.

* module-2.0/mod_mbox_out.c

(display_xml_msglist_entry): Re-order from escaping to always escape last.

(mbox_xml_message): HTML-escape unprintable chars in body and re-order from.

pcre-config --cflags actually emits include paths not cflags, so add it to

correct variable. Also, reuse APR_INCLUDES/APU_INCLUDES variables so as to

save an extra invocation of config files.



* modules/proxy/config.m4: Remove spurious notices from configure.

Make OpenSSL pkg-config usage consistent so that we don't run the early

configure checks against a /usr installed OpenSSL and then link against

a different pkg-config installed OpenSSL.

(Hint: Try with Mac OS X with MacPorts's OpenSSL or FreeBSD w/OpenSSL ports.)

* acinclude.m4

(APACHE_CHECK_SSL_TOOLKIT): Load in pkg-config variables first before doing

any OpenSSL checks so that we don't clobber things later.

Fix up SSL autoconf-fu so as not to emit bogus lines.

* acinclude.m4

(APACHE_CHECK_SSL_TOOLKIT): Move CHECKING line to match; convert a warning

to AC_MSG_WARN; remove a spurious SSL-C checking; redirect stderr from the

pkgconfig so as not to spew on errors.

Silence ulimit warnings on platforms/configs that don't support setting the

soft limit to the hard limit (aka default Mac OS X).

* support/config.m4: Redirect output to /dev/null.

Fix issue with chunked keep-alive responses when the initial chunk content

starts with a NULL byte.

* flood_socket_keepalive.c

(keepalive_read_chunk): Don't inspect resp->chunk with respect to

validity; re-order comparisons to make a bit more sense.

(keepalive_recv_resp): Be sure that chunk_length is always initialized.

Fix HTTP keepalives over SSL.

* flood_net_ssl.c

(ssl_check_socket): Implement.

* flood_net_ssl.h

(ssl_check_socket): Declare.

* flood_socket_keepalive.c

(ksock_check_socket, ksock_close_socket): Declare helper macros.

(keepalive_begin_conn): Use helper function to call appropriate checker.

(keepalive_end_conn): Use helper to close socket.

Support building against installed Ubuntu APR packages.

* Permit usage of installed APR/APR-util if no

--with-apr(-util) arguments specified; override the compiler name

per $apr_config to avoid tag mismatches with APR's bundled GNU


* CHANGES: Update.

* analyze-relative: Update to work with non-Solaris sort's.

    • ?
Update relative times report to use appropriate APR format string.

* flood_report_relative_times.c

(relative_times_process_stats): Use %pT extension to emit proper format.

* CHANGES: Update.

Protect relative times report output with a mutex to avoid overlap.

* flood_config.h

(config_t): Add thread mutex to config structure.

* flood_farm.c

(run_farm): Create thread mutex when we create farmers structure.

* flood_report_relative_times.c

(relative_report_t): New structure to hold pointer to a config.

(relative_times_report_init): Create report structure and stash config.

(relative_times_process_stats): Use thread mutex to lock printf calls.

* CHANGES: Update.

    • ?
* flood_subst_file.c

(main): Remove weird comment.

* STATUS: Propose minor docco fix for backport.

Fix up various compiler warnings.

* flood_net_ssl.c, flood_net_ssl.h

(ssl_read_socket): Switch from int to apr_size_t.

* flood_socket_keepalive.c

(keepalive_read_chunk, keepalive_load_resp, keepalive_recv_resp): Switch

from int to apr_size_t.

* flood_round_robin.c

(round_robin_postprocess): Switch from int to apr_size_t.

* flood_net.c, flood_net.h

(read_socket): Switch from int to apr_size_t.

    • ?
* flood_subst_file.h

(close_subst_file): Remove as this is no longer public.

Fix up flood_subst_file implementation so that we compile again on Mac OS X.

Also fix up various nits, add licensing blocks, and reformat to better follow

coding standards.

* flood_subst_file.c, flood_subst_file.h: Misc. fixes.

* STATUS: Review some backports.

* INSTALL: Add a blurb about --with-included-apr option.

Submitted by: Tim Bray

Tweaked by: jerenkrantz

Fix compilation errors with newer gcc versions.

* flood_round_robin.c

(round_robin_profile_init): Give compiler a bigger clue about what to cast.

Submitted by: Ohad Lutzky

Reviewed by: jerenkrantz

Take a whack at improving mod_wombat's build system and making it more like

other httpd modules (ie use buildconf vs bootstrap).

This builds out-of-the-box on Leopard...

*, Tweak to be more auto-fu-y.

* bootstrap: Remove in favor of...

* buildconf: this, which follows httpd conventions.

* build/, build/, build/PrintPath: Copy over from APR.

    • ?
Build against trunk.

* vmprep.c

(apw_load_apache2_lmodule): Use function in trunk.