Ensure http2 follows http in the meaning of
status WRITE (meaning 'in the request processing
phase' even if still consuming the request body,
not literally in a 'now writing' state).
Ensure a number of MPMs and the h2 connection io
no longer clobber the request status line during
state-only changes. While at it, clean up some
very ugly formatting and unnecessary decoration,
and avoid the wordy _from_conn() flavor when we
are not passing a connection_rec.
Ensure the useragent_ip is only used in the case
where it has been initialized, fall back on the
connection's remote_ip if the status is accidently
updated from an uninitialized request_rec.
Revert to 2.4.1 behavior and null the request and vhost as appropriate.
PR: 59333
Submitted by: wrowe
Reviewed by: wrowe, ylavic, rpluem
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1742179 13f79535-47bb-0310-9956-
ffa450edef68
Changes with Apache 2.4.21
+ *) Scoreboard: Fix a regression in 2.4.20 that causes wrong request data
+ to be displayed on the status page. PR 59333. [Yann Ylavic, William Rowe]
+
*) mod_http2: fixed a bug that caused mod_proxy_http2 to be called for window
updates on requests it had already reported done. Added synchronization
on early connection/stream close that lets ongoing requests safely drain
*) mod_http2: scoreboard updates that summarize the h2 session (and replace
the last request information) will only happen when the session is idle or
in shutdown/done phase. [Stefan Eissing]
-
+
*) mod_http2: new "bucket beam" technology to transport buckets across
threads without buffer copy. Delaying response start until flush or
enough body data has been accumulated. Overall significanlty smaller
memory footprint. [Stefan Eissing]
-
+
*) core: New CGIVar directive can configure REQUEST_URI to represent the
current URI being processed instead of always the original request.
[Jeff Trawick]
*) mod_http2: r->protocol changed to "HTTP/2.0" (was "HTTP/2") as this will
give expected syntax in CGI's SERVER_PROTOCOL is more compatible with
existing major/minor handling. Fixes PR 59313.
-
+
*) mod_http2: disabling mmap for file buckets transport due to segmenation
faults when files change on the fly.
-
+
Changes with Apache 2.4.20
*) core: Do not read .htaccess if AllowOverride and AllowOverrideList
*) core/util_script: relax alphanumeric filter of enviroment variable names
on Windows to allow '(' and ')' for passing PROGRAMFILES(X86) et.al.
- unadulterated in 64 bit versions of Windows. PR 46751.
+ unadulterated in 64 bit versions of Windows. PR 46751.
[John <john leineweb de>]
*) mod_http2: incrementing keepalives on each request started so that logging
*) mod_http2: fix for missing score board updates on request count, fix for
memory leak on slave connection reuse. [Stefan Eissing]
-
+
*) mod_http2: Fix build on Windows from dsp files.
[Stefan Eissing]
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) Correct scoreboard behaviors in multiple MPMs and mod_http2 to avoid
- clobbering the most recent request line at unexpect times. Corrects
- a notable regression in 2.4.20 and in some earlier edge cases.
- PR 59333
- See r1741310 for more precise patch details
- trunk patch: http://svn.apache.org/r1741310
- http://svn.apache.org/r1741461
- 2.4.x patch: https://raw.githubusercontent.com/wrowe/patches/master/backport-httpd-2.4-r1741310-1741461.patch
- +1: wrowe, ylavic, rpluem
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
http://svn.apache.org/r1740119
2.4.x: trunk works modulo CHANGES
+1: icing
-
+
*) mod_proxy_hcheck: Dynamic reverse proxy backend health check module
Trunk version of patch: <various>
Backport version for 2.4.x of patch:
return APR_SUCCESS;
}
- ap_update_child_status_from_conn(c->sbh, SERVER_BUSY_WRITE, c);
+ ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, NULL);
apr_brigade_length(bb, 0, &bblen);
h2_conn_io_bb_log(c, 0, APLOG_TRACE2, "master conn pass", bb);
status = ap_pass_brigade(c->output_filters, bb);
"h2_task(%s): create request_rec", task->id);
r = h2_request_create_rec(req, c);
if (r && (r->status == HTTP_OK)) {
- ap_update_child_status(c->sbh, SERVER_BUSY_READ, r);
+ ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r);
if (cs) {
cs->state = CONN_STATE_HANDLER;
conn_rec *c = (conn_rec *) apr_pcalloc(ptrans, sizeof(conn_rec));
c->sbh = sbh;
- (void)ap_update_child_status(c->sbh, SERVER_BUSY_READ, (request_rec *)NULL);
+ ap_update_child_status(c->sbh, SERVER_BUSY_READ, NULL);
/* Got a connection structure, so initialize what fields we can
* (the rest are zeroed out by pcalloc).
if (cs->pub.state == CONN_STATE_WRITE_COMPLETION) {
ap_filter_t *output_filter = c->output_filters;
apr_status_t rv;
- ap_update_child_status_from_conn(sbh, SERVER_BUSY_WRITE, c);
+ ap_update_child_status(sbh, SERVER_BUSY_WRITE, NULL);
while (output_filter->next != NULL) {
output_filter = output_filter->next;
}
}
ap_update_child_status_from_indexes(process_slot, thread_slot,
- dying ? SERVER_GRACEFUL : SERVER_READY, NULL);
+ dying ? SERVER_GRACEFUL
+ : SERVER_READY, NULL);
worker_pop:
if (workers_may_exit) {
break;
}
ap_update_child_status_from_indexes(process_slot, thread_slot,
- dying ? SERVER_DEAD :
- SERVER_GRACEFUL,
- (request_rec *) NULL);
+ dying ? SERVER_DEAD
+ : SERVER_GRACEFUL, NULL);
apr_thread_exit(thd, APR_SUCCESS);
return NULL;
for (i = 0; i < threads_per_child; i++)
ap_update_child_status_from_indexes(child_slot, i,
- SERVER_DEAD,
- (request_rec *) NULL);
+ SERVER_DEAD, NULL);
event_note_child_killed(child_slot, 0, 0);
ps = &ap_scoreboard_image->parent[child_slot];
}
}
- ap_update_child_status_from_indexes(0, thread_num, SERVER_DEAD,
- (request_rec *) NULL);
+ ap_update_child_status_from_indexes(0, thread_num, SERVER_DEAD, NULL);
return 0;
}
threads_created);
}
for (i = 0; i < threads_created; i++) {
- int *score_idx;
+ int *idx;
TerminateThread(child_handles[i], 1);
CloseHandle(child_handles[i]);
/* Reset the scoreboard entry for the thread we just whacked */
- score_idx = apr_hash_get(ht, &child_handles[i], sizeof(HANDLE));
- if (score_idx) {
- ap_update_child_status_from_indexes(0, *score_idx, SERVER_DEAD, NULL);
+ idx = apr_hash_get(ht, &child_handles[i], sizeof(HANDLE));
+ if (idx) {
+ ap_update_child_status_from_indexes(0, *idx, SERVER_DEAD, NULL);
}
}
ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf, APLOGNO(00364)
ap_scoreboard_image->servers[process_slot][thread_slot].pid = ap_my_pid;
ap_scoreboard_image->servers[process_slot][thread_slot].tid = apr_os_thread_current();
ap_scoreboard_image->servers[process_slot][thread_slot].generation = retained->my_generation;
- ap_update_child_status_from_indexes(process_slot, thread_slot, SERVER_STARTING, NULL);
+ ap_update_child_status_from_indexes(process_slot, thread_slot,
+ SERVER_STARTING, NULL);
#ifdef HAVE_PTHREAD_KILL
unblock_signal(WORKER_SIGNAL);
is_idle = 1;
}
- ap_update_child_status_from_indexes(process_slot, thread_slot, SERVER_READY, NULL);
+ ap_update_child_status_from_indexes(process_slot, thread_slot,
+ SERVER_READY, NULL);
worker_pop:
if (workers_may_exit) {
break;
}
ap_update_child_status_from_indexes(process_slot, thread_slot,
- (dying) ? SERVER_DEAD : SERVER_GRACEFUL, (request_rec *) NULL);
+ dying ? SERVER_DEAD
+ : SERVER_GRACEFUL, NULL);
apr_thread_exit(thd, APR_SUCCESS);
return NULL;
process_score *ps;
for (i = 0; i < threads_per_child; i++)
- ap_update_child_status_from_indexes(child_slot, i, SERVER_DEAD,
- (request_rec *) NULL);
+ ap_update_child_status_from_indexes(child_slot, i,
+ SERVER_DEAD, NULL);
worker_note_child_killed(child_slot, 0, 0);
ps = &ap_scoreboard_image->parent[child_slot];
else if (r) {
copy_request(ws->request, sizeof(ws->request), r);
}
+ else if (c) {
+ ws->request[0]='\0';
+ }
- if (r) {
+ if (r && r->useragent_ip) {
if (!(val = ap_get_useragent_host(r, REMOTE_NOLOOKUP, NULL)))
apr_cpystrn(ws->client, r->useragent_ip, sizeof(ws->client));
else
apr_cpystrn(ws->vhost, s->server_hostname, sizeof(ws->vhost));
}
}
+ else if (c) {
+ ws->vhost[0]='\0';
+ }
if (c) {
val = ap_get_protocol(c);