mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
Fix the use of the default 'flush' provider.
Improve documentation for the "flusher" parameter. Remove useless empty lines. See http://mail-archives.apache.org/mod_mbox/httpd-dev/200812.mbox/%3C494226C0.4050407@force-elite.com%3E for some more explanation. A python script is given there to test. I had to tweak it to have it work (use: fd, payload = passfd.recvfd(conn.fileno()) instead of: fd = passfd.recvfd(conn.fileno()) ) This is a r1058621 regression, where somehow "char *flusher" has been turned into a "char flusher[]". So it is been broken since the beginning of 2.4.x After this change (i.e. r1058621), 'flusher' is no more a pointer (NULL'ed when the structure it belongs to is created) but the address of an array within a structure. It can not be NULL anymore. So, we now have to look at the content of the array itself to see if it has been initialized or if we have to use the default value instead. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1717063 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -57,7 +57,6 @@ static apr_status_t get_socket_from_path(apr_pool_t *p,
|
||||
*out_sock = NULL;
|
||||
|
||||
rv = apr_socket_create(&s, AF_UNIX, SOCK_STREAM, 0, p);
|
||||
|
||||
if (rv != APR_SUCCESS) {
|
||||
return rv;
|
||||
}
|
||||
@@ -72,7 +71,6 @@ static apr_status_t get_socket_from_path(apr_pool_t *p,
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
static apr_status_t send_socket(apr_pool_t *p,
|
||||
apr_socket_t *s,
|
||||
apr_socket_t *outbound)
|
||||
@@ -119,7 +117,6 @@ static apr_status_t send_socket(apr_pool_t *p,
|
||||
return errno;
|
||||
}
|
||||
|
||||
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -149,7 +146,7 @@ static int proxy_fdpass_handler(request_rec *r, proxy_worker *worker,
|
||||
|
||||
{
|
||||
int status;
|
||||
const char *flush_method = worker->s->flusher ? worker->s->flusher : "flush";
|
||||
const char *flush_method = *worker->s->flusher ? worker->s->flusher : "flush";
|
||||
|
||||
proxy_fdpass_flush *flush = ap_lookup_provider(PROXY_FDPASS_FLUSHER,
|
||||
flush_method, "0");
|
||||
@@ -191,7 +188,6 @@ static int proxy_fdpass_handler(request_rec *r, proxy_worker *worker,
|
||||
ap_set_core_module_config(r->connection->conn_config, dummy);
|
||||
}
|
||||
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user