Commit 39b8af53 authored by Mladen Turk's avatar Mladen Turk
Browse files

When Servlet container sends AJP body message with size 0, this means that...

When Servlet container sends AJP body message with size 0, this means that Servlet container has asked for an  explicit flush.
Create flush bucket in that case.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@468941 13f79535-47bb-0310-9956-ffa450edef68
parent aeb8ba95
Loading
Loading
Loading
Loading
+9 −0
Changes for modules/proxy/mod_proxy_ajp.c: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -327,6 +327,14 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                /* AJP13_SEND_BODY_CHUNK: piece of data */
                status = ajp_parse_data(r, conn->data, &size, &buff);
                if (status == APR_SUCCESS) {
                    if (size == 0) {
                        /* AJP13_SEND_BODY_CHUNK with zero length
                         * is explicit flush message
                         */
                        e = apr_bucket_flush_create(r->connection->bucket_alloc);
                        APR_BRIGADE_INSERT_TAIL(output_brigade, e);
                    }
                    else {
                        e = apr_bucket_transient_create(buff, size,
                                                    r->connection->bucket_alloc);
                        APR_BRIGADE_INSERT_TAIL(output_brigade, e);
@@ -342,6 +350,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                        apr_brigade_length(output_brigade, 0, &bb_len);
                        if (bb_len != -1)
                            conn->worker->s->read += bb_len;
                    }
                    if (ap_pass_brigade(r->output_filters,
                                        output_brigade) != APR_SUCCESS) {
                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,