Commit f2413112 authored by Ruediger Pluem's avatar Ruediger Pluem
Browse files

Merge r1741310, r1741461 from trunk:


  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
parent d7e50093
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@

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
+1 −10
Original line number Diff line number Diff line
@@ -114,15 +114,6 @@ RELEASE SHOWSTOPPERS:
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 ]
+1 −1
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ static apr_status_t pass_out(apr_bucket_brigade *bb, void *ctx)
        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);
+1 −1
Original line number Diff line number Diff line
@@ -682,7 +682,7 @@ static apr_status_t h2_task_process_request(h2_task *task, conn_rec *c)
                  "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;
+1 −1
Original line number Diff line number Diff line
@@ -4877,7 +4877,7 @@ static conn_rec *core_create_conn(apr_pool_t *ptrans, server_rec *server,
    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).
Loading