You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2011/12/03 00:02:11 UTC
svn commit: r1209766 [7/12] - in /httpd/httpd/trunk: docs/log-message-tags/
modules/aaa/ modules/apreq/ modules/arch/netware/ modules/arch/unix/
modules/arch/win32/ modules/cache/ modules/cluster/ modules/core/
modules/database/ modules/dav/fs/ modules...
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c?rev=1209766&r1=1209765&r2=1209766&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c Fri Dec 2 23:02:04 2011
@@ -50,7 +50,7 @@ static int proxy_ajp_canon(request_rec *
*/
err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
if (err) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "error parsing URL %s: %s",
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00867) "error parsing URL %s: %s",
url, err);
return HTTP_BAD_REQUEST;
}
@@ -208,7 +208,7 @@ static int ap_proxy_ajp_request(apr_pool
status = ajp_send_header(conn->sock, r, maxsize, uri);
if (status != APR_SUCCESS) {
conn->close++;
- ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00868)
"request failed to %pI (%s)",
conn->worker->cp->addr,
conn->worker->s->hostname);
@@ -235,7 +235,7 @@ static int ap_proxy_ajp_request(apr_pool
if (status != APR_SUCCESS) {
/* We had a failure: Close connection to backend */
conn->close++;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00869)
"ajp_alloc_data_msg failed");
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -245,7 +245,7 @@ static int ap_proxy_ajp_request(apr_pool
tenc = apr_table_get(r->headers_in, "Transfer-Encoding");
if (tenc && (strcasecmp(tenc, "chunked") == 0)) {
/* The AJP protocol does not want body data yet */
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "request is chunked");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00870) "request is chunked");
} else {
/* Get client provided Content-Length header */
content_length = get_content_length(r);
@@ -256,7 +256,7 @@ static int ap_proxy_ajp_request(apr_pool
if (status != APR_SUCCESS) {
/* We had a failure: Close connection to backend */
conn->close++;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00871)
"ap_get_brigade failed");
apr_brigade_destroy(input_brigade);
return HTTP_BAD_REQUEST;
@@ -264,11 +264,11 @@ static int ap_proxy_ajp_request(apr_pool
/* have something */
if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(input_brigade))) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "APR_BUCKET_IS_EOS");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00872) "APR_BUCKET_IS_EOS");
}
/* Try to send something */
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00873)
"data to read (max %" APR_SIZE_T_FMT
" at %" APR_SIZE_T_FMT ")", bufsiz, msg->pos);
@@ -277,13 +277,13 @@ static int ap_proxy_ajp_request(apr_pool
/* We had a failure: Close connection to backend */
conn->close++;
apr_brigade_destroy(input_brigade);
- ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00874)
"apr_brigade_flatten");
return HTTP_INTERNAL_SERVER_ERROR;
}
apr_brigade_cleanup(input_brigade);
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00875)
"got %" APR_SIZE_T_FMT " bytes of data", bufsiz);
if (bufsiz > 0) {
status = ajp_send_data_msg(conn->sock, msg, bufsiz);
@@ -292,7 +292,7 @@ static int ap_proxy_ajp_request(apr_pool
/* We had a failure: Close connection to backend */
conn->close++;
apr_brigade_destroy(input_brigade);
- ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00876)
"send failed to %pI (%s)",
conn->worker->cp->addr,
conn->worker->s->hostname);
@@ -306,7 +306,7 @@ static int ap_proxy_ajp_request(apr_pool
send_body = 1;
}
else if (content_length > 0) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00877)
"read zero bytes, expecting"
" %" APR_OFF_T_FMT " bytes",
content_length);
@@ -332,7 +332,7 @@ static int ap_proxy_ajp_request(apr_pool
/* We had a failure: Close connection to backend */
conn->close++;
apr_brigade_destroy(input_brigade);
- ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00878)
"read response failed from %pI (%s)",
conn->worker->cp->addr,
conn->worker->s->hostname);
@@ -379,7 +379,7 @@ static int ap_proxy_ajp_request(apr_pool
/* This is the end */
bufsiz = 0;
havebody = 0;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00879)
"APR_BUCKET_IS_EOS");
} else {
status = ap_get_brigade(r->input_filters, input_brigade,
@@ -387,7 +387,7 @@ static int ap_proxy_ajp_request(apr_pool
APR_BLOCK_READ,
maxsize - AJP_HEADER_SZ);
if (status != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00880)
"ap_get_brigade failed");
output_failed = 1;
break;
@@ -397,7 +397,7 @@ static int ap_proxy_ajp_request(apr_pool
&bufsiz);
apr_brigade_cleanup(input_brigade);
if (status != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00881)
"apr_brigade_flatten failed");
output_failed = 1;
break;
@@ -409,7 +409,7 @@ static int ap_proxy_ajp_request(apr_pool
status = ajp_send_data_msg(conn->sock, msg, bufsiz);
ajp_msg_log(r, msg, "ajp_send_data_msg after CMD_AJP13_GET_BODY_CHUNK: ajp_ilink_send packet dump");
if (status != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00882)
"ajp_send_data_msg failed");
backend_failed = 1;
break;
@@ -420,7 +420,7 @@ static int ap_proxy_ajp_request(apr_pool
* something is wrong TC asks for more body but we are
* already at the end of the body data
*/
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00883)
"ap_proxy_ajp_request error read after end");
backend_failed = 1;
}
@@ -431,7 +431,7 @@ static int ap_proxy_ajp_request(apr_pool
* Backend already send us the headers.
*/
backend_failed = 1;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00884)
"Backend sent headers twice.");
break;
}
@@ -446,7 +446,7 @@ static int ap_proxy_ajp_request(apr_pool
if ((buf = apr_table_get(r->headers_out, wa))) {
apr_table_set(r->err_headers_out, wa, buf);
} else {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00885)
"ap_proxy_ajp_request: origin server "
"sent 401 without WWW-Authenticate header");
}
@@ -470,7 +470,7 @@ static int ap_proxy_ajp_request(apr_pool
APR_BRIGADE_INSERT_TAIL(output_brigade, e);
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00886)
"Ignoring flush message "
"received before headers");
}
@@ -509,7 +509,7 @@ static int ap_proxy_ajp_request(apr_pool
if (headers_sent) {
if (ap_pass_brigade(r->output_filters,
output_brigade) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00887)
"error processing body.%s",
r->connection->aborted ?
" Client aborted connection." : "");
@@ -538,7 +538,7 @@ static int ap_proxy_ajp_request(apr_pool
APR_BRIGADE_INSERT_TAIL(output_brigade, e);
if (ap_pass_brigade(r->output_filters,
output_brigade) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00888)
"error processing end");
output_failed = 1;
}
@@ -578,7 +578,7 @@ static int ap_proxy_ajp_request(apr_pool
(ajp_msg_t **)&(conn->data));
if (status != APR_SUCCESS) {
backend_failed = 1;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00889)
"ajp_read_header failed");
break;
}
@@ -593,7 +593,7 @@ static int ap_proxy_ajp_request(apr_pool
apr_brigade_cleanup(output_brigade);
if (backend_failed || output_failed) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00890)
"Processing of request failed backend: %i, "
"output: %i", backend_failed, output_failed);
/* We had a failure: Close connection to backend */
@@ -604,7 +604,7 @@ static int ap_proxy_ajp_request(apr_pool
}
}
else if (!request_ended) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00891)
"Processing of request didn't terminate cleanly");
/* We had a failure: Close connection to backend */
conn->close++;
@@ -619,7 +619,7 @@ static int ap_proxy_ajp_request(apr_pool
conn->close++;
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00892)
"got response from %pI (%s)",
conn->worker->cp->addr,
conn->worker->s->hostname);
@@ -638,7 +638,7 @@ static int ap_proxy_ajp_request(apr_pool
}
if (backend_failed) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00893)
"dialog to %pI (%s) failed",
conn->worker->cp->addr,
conn->worker->s->hostname);
@@ -721,10 +721,10 @@ static int proxy_ajp_handler(request_rec
if (strncasecmp(url, "ajp:", 4) != 0) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "declining URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00894) "declining URL %s", url);
return DECLINED;
}
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "serving URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00895) "serving URL %s", url);
/* create space for state information */
status = ap_proxy_acquire_connection(scheme, &backend, worker,
@@ -754,7 +754,7 @@ static int proxy_ajp_handler(request_rec
/* Step Two: Make the Connection */
if (ap_proxy_connect_backend(scheme, backend, worker, r->server)) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00896)
"failed to make connection to backend: %s",
backend->hostname);
status = HTTP_SERVICE_UNAVAILABLE;
@@ -773,7 +773,7 @@ static int proxy_ajp_handler(request_rec
*/
if (status != APR_SUCCESS) {
backend->close++;
- ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00897)
"cping/cpong failed to %pI (%s)",
worker->cp->addr, worker->s->hostname);
status = HTTP_SERVICE_UNAVAILABLE;
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c?rev=1209766&r1=1209765&r2=1209766&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c Fri Dec 2 23:02:04 2011
@@ -77,7 +77,7 @@ static int proxy_balancer_canon(request_
*/
err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
if (err) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01157)
"error parsing URL %s: %s",
url, err);
return HTTP_BAD_REQUEST;
@@ -117,7 +117,7 @@ static void init_balancer_members(apr_po
for (i = 0; i < balancer->workers->nelts; i++) {
int worker_is_initialized;
proxy_worker *worker = *workers;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01158)
"Looking at %s -> %s initialized?", balancer->s->name, worker->s->name);
worker_is_initialized = PROXY_WORKER_IS_INITIALIZED(worker);
if (!worker_is_initialized) {
@@ -278,7 +278,7 @@ static proxy_worker *find_session_route(
/* Try to find the sticky route inside url */
*route = get_path_param(r->pool, *url, balancer->s->sticky_path, balancer->s->scolonsep);
if (*route) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01159)
"Found value %s for stickysession %s",
*route, balancer->s->sticky_path);
*sticky_used = balancer->s->sticky_path;
@@ -287,7 +287,7 @@ static proxy_worker *find_session_route(
*route = get_cookie_param(r, balancer->s->sticky);
if (*route) {
*sticky_used = balancer->s->sticky;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01160)
"Found value %s for stickysession %s",
*route, balancer->s->sticky);
}
@@ -299,7 +299,7 @@ static proxy_worker *find_session_route(
if ((*route) && ((*route = strchr(*route, '.')) != NULL ))
(*route)++;
if ((*route) && (**route)) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Found route %s", *route);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01161) "Found route %s", *route);
/* We have a route in path or in cookie
* Find the worker that has this route defined.
*/
@@ -310,7 +310,7 @@ static proxy_worker *find_session_route(
* the route supplied by the client.
*/
apr_table_setn(r->subprocess_env, "BALANCER_ROUTE_CHANGED", "1");
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01162)
"Route changed from %s to %s",
*route, worker->s->route);
}
@@ -327,7 +327,7 @@ static proxy_worker *find_best_worker(pr
apr_status_t rv;
if ((rv = PROXY_THREAD_LOCK(balancer)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01163)
"%s: Lock failed for find_best_worker()",
balancer->s->name);
return NULL;
@@ -339,7 +339,7 @@ static proxy_worker *find_best_worker(pr
candidate->s->elected++;
if ((rv = PROXY_THREAD_UNLOCK(balancer)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01164)
"%s: Unlock failed for find_best_worker()",
balancer->s->name);
}
@@ -430,7 +430,7 @@ static void force_recovery(proxy_balance
for (i = 0; i < balancer->workers->nelts; i++, worker++) {
++(*worker)->s->retries;
(*worker)->s->status &= ~PROXY_WORKER_IN_ERROR;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01165)
"%s: Forcing recovery for worker (%s)",
balancer->s->name, (*worker)->s->hostname);
}
@@ -462,7 +462,7 @@ static int proxy_balancer_pre_request(pr
* XXX: perhaps we need the process lock here
*/
if ((rv = PROXY_THREAD_LOCK(*balancer)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01166)
"%s: Lock failed for pre_request", (*balancer)->s->name);
return DECLINED;
}
@@ -523,11 +523,11 @@ static int proxy_balancer_pre_request(pr
workers++;
}
if (member_of) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01167)
"%s: All workers are in error state for route (%s)",
(*balancer)->s->name, route);
if ((rv = PROXY_THREAD_UNLOCK(*balancer)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01168)
"%s: Unlock failed for pre_request",
(*balancer)->s->name);
}
@@ -536,7 +536,7 @@ static int proxy_balancer_pre_request(pr
}
if ((rv = PROXY_THREAD_UNLOCK(*balancer)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01169)
"%s: Unlock failed for pre_request",
(*balancer)->s->name);
}
@@ -544,11 +544,11 @@ static int proxy_balancer_pre_request(pr
runtime = find_best_worker(*balancer, r);
if (!runtime) {
if ((*balancer)->workers->nelts) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01170)
"%s: All workers are in error state",
(*balancer)->s->name);
} else {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01171)
"%s: No workers in balancer",
(*balancer)->s->name);
}
@@ -596,7 +596,7 @@ static int proxy_balancer_pre_request(pr
apr_table_setn(r->subprocess_env,
"BALANCER_SESSION_ROUTE", route);
}
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01172)
"%s: worker (%s) rewritten to %s",
(*balancer)->s->name, (*worker)->s->name, *url);
@@ -612,7 +612,7 @@ static int proxy_balancer_post_request(p
apr_status_t rv;
if ((rv = PROXY_THREAD_LOCK(balancer)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01173)
"%s: Lock failed for post_request",
balancer->s->name);
return HTTP_INTERNAL_SERVER_ERROR;
@@ -623,7 +623,7 @@ static int proxy_balancer_post_request(p
for (i = 0; i < balancer->errstatuses->nelts; i++) {
int val = ((int *)balancer->errstatuses->elts)[i];
if (r->status == val) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01174)
"%s: Forcing recovery for worker (%s), "
"failonstatus %d",
balancer->s->name, worker->s->name, val);
@@ -635,10 +635,10 @@ static int proxy_balancer_post_request(p
}
if ((rv = PROXY_THREAD_UNLOCK(balancer)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01175)
"%s: Unlock failed for post_request", balancer->s->name);
}
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01176)
"proxy_balancer_post_request for (%s)", balancer->s->name);
if (worker && worker->s->busy)
@@ -719,7 +719,7 @@ static int balancer_post_config(apr_pool
storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared",
AP_SLOTMEM_PROVIDER_VERSION);
if (!storage) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01177)
"ap_lookup_provider %s failed: is mod_slotmem_shm loaded??",
AP_SLOTMEM_PROVIDER_GROUP);
return !OK;
@@ -738,7 +738,7 @@ static int balancer_post_config(apr_pool
if (conf->balancers->nelts) {
conf->max_balancers = conf->balancers->nelts + conf->bgrowth;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "Doing balancers create: %d, %d (%d)",
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01178) "Doing balancers create: %d, %d (%d)",
(int)ALIGNED_PROXY_BALANCER_SHARED_SIZE,
(int)conf->balancers->nelts, conf->max_balancers);
@@ -746,7 +746,7 @@ static int balancer_post_config(apr_pool
ALIGNED_PROXY_BALANCER_SHARED_SIZE,
conf->max_balancers, AP_SLOTMEM_TYPE_PREGRAB, pconf);
if (rv != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "balancer slotmem_create failed");
+ ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01179) "balancer slotmem_create failed");
return !OK;
}
conf->bslot = new;
@@ -767,7 +767,7 @@ static int balancer_post_config(apr_pool
rv = ap_global_mutex_create(&(balancer->gmutex), NULL, balancer_mutex_type,
balancer->s->sname, s, pconf, 0);
if (rv != APR_SUCCESS || !balancer->gmutex) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
+ ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01180)
"mutex creation of %s : %s failed", balancer_mutex_type,
balancer->s->sname);
return HTTP_INTERNAL_SERVER_ERROR;
@@ -778,21 +778,21 @@ static int balancer_post_config(apr_pool
/* setup shm for balancers */
if ((rv = storage->grab(conf->bslot, &index)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "balancer slotmem_grab failed");
+ ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01181) "balancer slotmem_grab failed");
return !OK;
}
if ((rv = storage->dptr(conf->bslot, index, (void *)&bshm)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "balancer slotmem_dptr failed");
+ ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01182) "balancer slotmem_dptr failed");
return !OK;
}
if ((rv = ap_proxy_share_balancer(balancer, bshm, index)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "Cannot share balancer");
+ ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01183) "Cannot share balancer");
return !OK;
}
/* create slotmem slots for workers */
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "Doing workers create: %s (%s), %d, %d",
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01184) "Doing workers create: %s (%s), %d, %d",
balancer->s->name, balancer->s->sname,
(int)ALIGNED_PROXY_WORKER_SHARED_SIZE,
(int)balancer->max_workers);
@@ -801,7 +801,7 @@ static int balancer_post_config(apr_pool
ALIGNED_PROXY_WORKER_SHARED_SIZE,
balancer->max_workers, AP_SLOTMEM_TYPE_PREGRAB, pconf);
if (rv != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "worker slotmem_create failed");
+ ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01185) "worker slotmem_create failed");
return !OK;
}
balancer->wslot = new;
@@ -817,16 +817,16 @@ static int balancer_post_config(apr_pool
worker = *workers;
if ((rv = storage->grab(balancer->wslot, &index)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "worker slotmem_grab failed");
+ ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01186) "worker slotmem_grab failed");
return !OK;
}
if ((rv = storage->dptr(balancer->wslot, index, (void *)&shm)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "worker slotmem_dptr failed");
+ ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01187) "worker slotmem_dptr failed");
return !OK;
}
if ((rv = ap_proxy_share_worker(worker, shm, index)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "Cannot share worker");
+ ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01188) "Cannot share worker");
return !OK;
}
worker->s->updated = tstamp;
@@ -930,13 +930,13 @@ static int balancer_handler(request_rec
balancer = (proxy_balancer *)conf->balancers->elts;
for (i = 0; i < conf->balancers->nelts; i++, balancer++) {
if ((rv = PROXY_THREAD_LOCK(balancer)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01189)
"%s: Lock failed for balancer_handler",
balancer->s->name);
}
ap_proxy_sync_balancer(balancer, r->server, conf);
if ((rv = PROXY_THREAD_UNLOCK(balancer)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01190)
"%s: Unlock failed for balancer_handler",
balancer->s->name);
}
@@ -944,7 +944,7 @@ static int balancer_handler(request_rec
if (r->args && (r->method_number == M_GET)) {
const char *allowed[] = { "w", "b", "nonce", NULL };
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "parsing r->args");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01191) "parsing r->args");
push2table(r->args, params, allowed, r->pool);
}
@@ -991,7 +991,7 @@ static int balancer_handler(request_rec
const char *val;
int was_usable = PROXY_WORKER_IS_USABLE(wsel);
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "settings worker params");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01192) "settings worker params");
if ((val = apr_table_get(params, "w_lf"))) {
int ival = atoi(val);
@@ -1041,7 +1041,7 @@ static int balancer_handler(request_rec
if (bsel && ok2change) {
const char *val;
int ival;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01193)
"settings balancer params");
if ((val = apr_table_get(params, "b_lbm"))) {
if ((strlen(val) < (sizeof(bsel->s->lbpname)-1)) &&
@@ -1096,7 +1096,7 @@ static int balancer_handler(request_rec
nworker = ap_proxy_get_worker(conf->pool, bsel, conf, val);
if (!nworker && storage->num_free_slots(bsel->wslot)) {
if ((rv = PROXY_GLOBAL_LOCK(bsel)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01194)
"%s: Lock failed for adding worker",
bsel->s->name);
}
@@ -1106,40 +1106,40 @@ static int balancer_handler(request_rec
proxy_worker_shared *shm;
PROXY_COPY_CONF_PARAMS(nworker, conf);
if ((rv = storage->grab(bsel->wslot, &index)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r, APLOGNO(01195)
"worker slotmem_grab failed");
if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01196)
"%s: Unlock failed for adding worker",
bsel->s->name);
}
return HTTP_BAD_REQUEST;
}
if ((rv = storage->dptr(bsel->wslot, index, (void *)&shm)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r, APLOGNO(01197)
"worker slotmem_dptr failed");
if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01198)
"%s: Unlock failed for adding worker",
bsel->s->name);
}
return HTTP_BAD_REQUEST;
}
if ((rv = ap_proxy_share_worker(nworker, shm, index)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r, APLOGNO(01199)
"Cannot share worker");
if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01200)
"%s: Unlock failed for adding worker",
bsel->s->name);
}
return HTTP_BAD_REQUEST;
}
if ((rv = ap_proxy_initialize_worker(nworker, r->server, conf->pool)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r, APLOGNO(01201)
"Cannot init worker");
if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01202)
"%s: Unlock failed for adding worker",
bsel->s->name);
}
@@ -1151,7 +1151,7 @@ static int balancer_handler(request_rec
ap_proxy_set_wstatus('D', 1, nworker);
}
if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01203)
"%s: Unlock failed for adding worker",
bsel->s->name);
}
@@ -1162,7 +1162,7 @@ static int balancer_handler(request_rec
}
action = ap_construct_url(r->pool, r->uri, r);
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "genning page");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01204) "genning page");
if (apr_table_get(params, "xml")) {
ap_set_content_type(r, "text/xml");
@@ -1419,7 +1419,7 @@ static void balancer_child_init(apr_pool
unsigned int num;
storage->attach(&(conf->bslot), conf->id, &size, &num, p);
if (!conf->bslot) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, "slotmem_attach failed");
+ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01205) "slotmem_attach failed");
exit(1); /* Ugly, but what else? */
}
}
@@ -1429,7 +1429,7 @@ static void balancer_child_init(apr_pool
rv = ap_proxy_initialize_balancer(balancer, s, p);
if (rv != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(01206)
"Failed to init balancer %s in child",
balancer->s->name);
exit(1); /* Ugly, but what else? */
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_connect.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_connect.c?rev=1209766&r1=1209765&r2=1209766&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_connect.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_connect.c Fri Dec 2 23:02:04 2011
@@ -164,7 +164,7 @@ static int proxy_connect_transfer(reques
#ifdef DEBUGGING
len = -1;
apr_brigade_length(bb, 0, &len);
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01016)
"read %" APR_OFF_T_FMT
" bytes from %s", len, name);
#endif
@@ -173,12 +173,12 @@ static int proxy_connect_transfer(reques
ap_fflush(c_o->output_filters, bb);
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01017)
"error on %s - ap_pass_brigade",
name);
}
} else if (!APR_STATUS_IS_EAGAIN(rv)) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(01018)
"error on %s - ap_get_brigade",
name);
}
@@ -243,7 +243,7 @@ static int proxy_connect_handler(request
NULL));
}
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01019)
"connecting %s to %s:%d", url, uri.hostname, uri.port);
/* do a DNS lookup for the destination host */
@@ -326,7 +326,7 @@ static int proxy_connect_handler(request
if ((rv = apr_pollset_create(&pollset, 2, r->pool, 0)) != APR_SUCCESS) {
apr_socket_close(sock);
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01020)
"error apr_pollset_create()");
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -353,7 +353,7 @@ static int proxy_connect_handler(request
c->id, c->sbh, c->bucket_alloc);
if (!backconn) {
/* peer reset */
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01021)
"an error occurred creating a new connection "
"to %pI (%s)", connect_addr, connectname);
apr_socket_close(sock);
@@ -363,7 +363,7 @@ static int proxy_connect_handler(request
rc = ap_run_pre_connection(backconn, sock);
if (rc != OK && rc != DONE) {
backconn->aborted = 1;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01022)
"pre_connection setup failed (%d)", rc);
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -435,11 +435,11 @@ static int proxy_connect_handler(request
continue;
}
apr_socket_close(sock);
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "error apr_poll()");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01023) "error apr_poll()");
return HTTP_INTERNAL_SERVER_ERROR;
}
#ifdef DEBUGGING
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01024)
"woke from poll(), i=%d", pollcnt);
#endif
@@ -450,7 +450,7 @@ static int proxy_connect_handler(request
pollevent = cur->rtnevents;
if (pollevent & APR_POLLIN) {
#ifdef DEBUGGING
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01025)
"sock was readable");
#endif
rv = proxy_connect_transfer(r, backconn, c, bb, "sock");
@@ -458,7 +458,7 @@ static int proxy_connect_handler(request
else if ((pollevent & APR_POLLERR)
|| (pollevent & APR_POLLHUP)) {
rv = APR_EPIPE;
- ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, APLOGNO(01026)
"err/hup on backconn");
}
if (rv != APR_SUCCESS)
@@ -468,7 +468,7 @@ static int proxy_connect_handler(request
pollevent = cur->rtnevents;
if (pollevent & APR_POLLIN) {
#ifdef DEBUGGING
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01027)
"client was readable");
#endif
rv = proxy_connect_transfer(r, c, backconn, bb, "client");
@@ -476,7 +476,7 @@ static int proxy_connect_handler(request
}
else {
rv = APR_EBADF;
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01028)
"unknown socket in pollset");
}
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_express.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_express.c?rev=1209766&r1=1209765&r2=1209766&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_express.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_express.c Fri Dec 2 23:02:04 2011
@@ -122,13 +122,13 @@ static int xlate_name(request_rec *r)
return DECLINED;
}
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "proxy_express: Enabled");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01001) "proxy_express: Enabled");
if (!sconf->dbmfile || (r->filename && strncmp(r->filename, "proxy:", 6) == 0)) {
/* it should be go on as an internal proxy request */
return DECLINED;
}
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01002)
"proxy_express: Opening DBM file: %s (%s)",
sconf->dbmfile, sconf->dbmtype);
rv = apr_dbm_open_ex(&db, sconf->dbmtype, sconf->dbmfile, APR_DBM_READONLY,
@@ -138,7 +138,7 @@ static int xlate_name(request_rec *r)
}
name = ap_get_server_name(r);
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01003)
"proxy_express: looking for %s", name);
key.dptr = (char *)name;
key.dsize = strlen(key.dptr);
@@ -154,13 +154,13 @@ static int xlate_name(request_rec *r)
return DECLINED;
}
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01004)
"proxy_express: found %s -> %s", name, backend);
r->filename = apr_pstrcat(r->pool, "proxy:", backend, r->uri, NULL);
r->handler = "proxy-server";
r->proxyreq = PROXYREQ_REVERSE;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01005)
"proxy_express: rewritten as: %s", r->filename);
ralias = (struct proxy_alias *)dconf->raliases->elts;
@@ -182,7 +182,7 @@ static int xlate_name(request_rec *r)
/* Didn't find one... add it */
if (!ralias) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01006)
"proxy_express: adding PPR entry");
ralias = apr_array_push(dconf->raliases);
ralias->fake = "/";
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c?rev=1209766&r1=1209765&r2=1209766&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c Fri Dec 2 23:02:04 2011
@@ -91,7 +91,7 @@ static int proxy_fcgi_canon(request_rec
err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
if (err) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01059)
"error parsing URL %s: %s", url, err);
return HTTP_BAD_REQUEST;
}
@@ -116,13 +116,13 @@ static int proxy_fcgi_canon(request_rec
r->filename = apr_pstrcat(r->pool, "proxy:fcgi://", host, sport, "/",
path, NULL);
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01060)
"set r->filename to %s", r->filename);
if (apr_table_get(r->subprocess_env, "proxy-fcgi-pathinfo")) {
r->path_info = apr_pstrcat(r->pool, "/", path, NULL);
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01061)
"set r->path_info to %s", r->path_info);
}
@@ -317,7 +317,7 @@ static apr_status_t send_environment(pro
vallen = strlen(elts[i].val);
#ifdef FCGI_DUMP_ENV_VARS
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01062)
"sending env var '%s' value '%s'",
elts[i].key, elts[i].val);
#endif
@@ -333,7 +333,7 @@ static apr_status_t send_environment(pro
/* The cast of bodylen is safe since FCGI_MAX_ENV_SIZE is for sure an int */
if (envlen > FCGI_MAX_ENV_SIZE) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01063)
"truncating environment to %d bytes and %d elements",
(int)bodylen, i);
break;
@@ -499,7 +499,7 @@ static void dump_header_to_log(request_r
if (i >= 20) {
i = 0;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01064)
"HEADER: %s %s", asc_line, hex_line);
memset(asc_line, 0, sizeof(asc_line));
@@ -534,11 +534,11 @@ static void dump_header_to_log(request_r
}
if (i != 1) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "HEADER: %s %s",
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01065) "HEADER: %s %s",
asc_line, hex_line);
}
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "HEADER: -EOH-");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01066) "HEADER: -EOH-");
#endif
}
@@ -671,7 +671,7 @@ static apr_status_t dispatch(proxy_conn_
dump_header_to_log(r, farray, readbuflen);
if (readbuflen != FCGI_HEADER_LEN) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01067)
"Failed to read entire header "
"got %" APR_SIZE_T_FMT " wanted %d",
readbuflen, FCGI_HEADER_LEN);
@@ -682,7 +682,7 @@ static apr_status_t dispatch(proxy_conn_
fcgi_header_from_array(&header, farray);
if (header.version != FCGI_VERSION) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01068)
"Got bogus version %d", (int) header.version);
rv = APR_EINVAL;
break;
@@ -694,7 +694,7 @@ static apr_status_t dispatch(proxy_conn_
rid |= header.requestIdB0;
if (rid != request_id) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01069)
"Got bogus rid %d, expected %d",
rid, request_id);
rv = APR_EINVAL;
@@ -749,7 +749,7 @@ recv_again:
tmp_b = apr_bucket_eos_create(c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(ob, tmp_b);
ap_pass_brigade(r->output_filters, ob);
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01070)
"Error parsing script headers");
r->status = status;
rv = APR_EINVAL;
@@ -828,7 +828,7 @@ recv_again:
case FCGI_STDERR:
/* TODO: Should probably clean up this logging a bit... */
if (clen) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01071)
"Got error '%s'", readbuf);
}
@@ -843,7 +843,7 @@ recv_again:
break;
default:
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01072)
"Got bogus record %d", type);
break;
}
@@ -890,7 +890,7 @@ static int fcgi_do_request(apr_pool_t *p
/* Step 1: Send FCGI_BEGIN_REQUEST */
rv = send_begin_request(conn, request_id);
if (rv != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01073)
"Failed Writing Request to %s:", server_portstr);
conn->close = 1;
return HTTP_SERVICE_UNAVAILABLE;
@@ -899,7 +899,7 @@ static int fcgi_do_request(apr_pool_t *p
/* Step 2: Send Environment via FCGI_PARAMS */
rv = send_environment(conn, r, request_id);
if (rv != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01074)
"Failed writing Environment to %s:", server_portstr);
conn->close = 1;
return HTTP_SERVICE_UNAVAILABLE;
@@ -908,7 +908,7 @@ static int fcgi_do_request(apr_pool_t *p
/* Step 3: Read records from the back end server and handle them. */
rv = dispatch(conn, conf, r, request_id);
if (rv != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01075)
"Error dispatching request to %s:", server_portstr);
conn->close = 1;
return HTTP_SERVICE_UNAVAILABLE;
@@ -939,7 +939,7 @@ static int proxy_fcgi_handler(request_re
apr_uri_t *uri = apr_palloc(r->pool, sizeof(*uri));
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01076)
"url: %s proxyname: %s proxyport: %d",
url, proxyname, proxyport);
@@ -947,11 +947,11 @@ static int proxy_fcgi_handler(request_re
url += 5;
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "declining URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01077) "declining URL %s", url);
return DECLINED;
}
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "serving URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01078) "serving URL %s", url);
/* Create space for state information */
if (! backend) {
@@ -985,7 +985,7 @@ static int proxy_fcgi_handler(request_re
/* Step Two: Make the Connection */
if (ap_proxy_connect_backend(FCGI_SCHEME, backend, worker, r->server)) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01079)
"failed to make connection to backend: %s",
backend->hostname);
status = HTTP_SERVICE_UNAVAILABLE;
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_fdpass.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_fdpass.c?rev=1209766&r1=1209765&r2=1209766&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_fdpass.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_fdpass.c Fri Dec 2 23:02:04 2011
@@ -49,7 +49,7 @@ static int proxy_fdpass_canon(request_re
r->filename = apr_pstrcat(r->pool, "proxy:fd://", path, NULL);
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01151)
"set r->filename to %s", r->filename);
return OK;
}
@@ -195,7 +195,7 @@ static int proxy_fdpass_handler(request_
rv = get_socket_from_path(r->pool, url, &sock);
if (rv != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01152)
"Failed to connect to '%s'", url);
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -208,7 +208,7 @@ static int proxy_fdpass_handler(request_
flush_method, "0");
if (!flush) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01153)
"Unable to find configured flush provider '%s'",
flush_method);
return HTTP_INTERNAL_SERVER_ERROR;
@@ -224,7 +224,7 @@ static int proxy_fdpass_handler(request_
rv = send_socket(r->pool, sock, clientsock);
if (rv != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "send_socket failed:");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01154) "send_socket failed:");
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -237,7 +237,7 @@ static int proxy_fdpass_handler(request_
rv = apr_socket_create(&dummy, APR_INET, SOCK_STREAM, APR_PROTO_TCP,
r->connection->pool);
if (rv != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01155)
"failed to create dummy socket");
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -264,7 +264,7 @@ static int standard_flush(request_rec *r
status = ap_pass_brigade(r->output_filters, bb);
if (status != OK) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01156)
"ap_pass_brigade failed:");
return status;
}
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c?rev=1209766&r1=1209765&r2=1209766&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_ftp.c Fri Dec 2 23:02:04 2011
@@ -614,7 +614,7 @@ static apr_status_t proxy_send_dir_filte
filename = strrchr(ctx->buffer, ' ');
if (filename == NULL) {
/* Line is broken. Ignore it. */
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01034)
"proxy_ftp: could not parse line %s",
ctx->buffer);
/* erase buffer for next time around */
@@ -844,7 +844,7 @@ static int ftp_unauthorized(request_rec
* guessing attempts)
*/
if (log_it)
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01035)
"missing or failed auth to %s",
apr_uri_unparse(r->pool,
&r->parsed_uri, APR_URI_UNP_OMITPATHINFO));
@@ -1030,13 +1030,13 @@ static int proxy_ftp_handler(request_rec
password = "apache-proxy@";
}
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01036)
"connecting %s to %s:%d", url, connectname, connectport);
if (worker->s->is_address_reusable) {
if (!worker->cp->addr) {
if ((err = PROXY_THREAD_LOCK(worker->balancer)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, err, r, "lock");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, err, r, APLOGNO(01037) "lock");
return HTTP_INTERNAL_SERVER_ERROR;
}
}
@@ -1055,7 +1055,7 @@ static int proxy_ftp_handler(request_rec
if (worker->s->is_address_reusable && !worker->cp->addr) {
worker->cp->addr = connect_addr;
if ((uerr = PROXY_THREAD_UNLOCK(worker->balancer)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, uerr, r, "unlock");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, uerr, r, APLOGNO(01038) "unlock");
}
}
/*
@@ -1099,7 +1099,7 @@ static int proxy_ftp_handler(request_rec
if (ap_proxy_connect_backend("FTP", backend, worker, r->server)) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01039)
"an error occurred creating a new connection to %pI (%s)",
connect_addr, connectname);
proxy_ftp_cleanup(r, backend);
@@ -1338,7 +1338,7 @@ static int proxy_ftp_handler(request_rec
"EPSV contacting remote host on port %d", data_port);
if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01040)
"error creating EPSV socket");
proxy_ftp_cleanup(r, backend);
return HTTP_INTERNAL_SERVER_ERROR;
@@ -1347,14 +1347,14 @@ static int proxy_ftp_handler(request_rec
if (conf->recv_buffer_size > 0
&& (rv = apr_socket_opt_set(data_sock, APR_SO_RCVBUF,
conf->recv_buffer_size))) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01041)
"apr_socket_opt_set(SO_RCVBUF): Failed to "
"set ProxyReceiveBufferSize, using default");
}
rv = apr_socket_opt_set(data_sock, APR_TCP_NODELAY, 1);
if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01042)
"apr_socket_opt_set(APR_TCP_NODELAY): "
"Failed to set");
}
@@ -1365,7 +1365,7 @@ static int proxy_ftp_handler(request_rec
apr_sockaddr_info_get(&epsv_addr, data_ip, connect_addr->family, data_port, 0, p);
rv = apr_socket_connect(data_sock, epsv_addr);
if (rv != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01043)
"EPSV attempt to connect to %pI failed - "
"Firewall/NAT?", epsv_addr);
return ftp_proxyerror(r, backend, HTTP_BAD_GATEWAY, apr_psprintf(r->pool,
@@ -1424,12 +1424,12 @@ static int proxy_ftp_handler(request_rec
apr_sockaddr_t *pasv_addr;
apr_port_t pasvport = (p1 << 8) + p0;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01044)
"PASV contacting host %d.%d.%d.%d:%d",
h3, h2, h1, h0, pasvport);
if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01045)
"error creating PASV socket");
proxy_ftp_cleanup(r, backend);
return HTTP_INTERNAL_SERVER_ERROR;
@@ -1438,13 +1438,13 @@ static int proxy_ftp_handler(request_rec
if (conf->recv_buffer_size > 0
&& (rv = apr_socket_opt_set(data_sock, APR_SO_RCVBUF,
conf->recv_buffer_size))) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01046)
"apr_socket_opt_set(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default");
}
rv = apr_socket_opt_set(data_sock, APR_TCP_NODELAY, 1);
if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01047)
"apr_socket_opt_set(APR_TCP_NODELAY): "
"Failed to set");
}
@@ -1453,7 +1453,7 @@ static int proxy_ftp_handler(request_rec
apr_sockaddr_info_get(&pasv_addr, apr_psprintf(p, "%d.%d.%d.%d", h3, h2, h1, h0), connect_addr->family, pasvport, 0, p);
rv = apr_socket_connect(data_sock, pasv_addr);
if (rv != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01048)
"PASV attempt to connect to %pI failed - Firewall/NAT?", pasv_addr);
return ftp_proxyerror(r, backend, HTTP_BAD_GATEWAY, apr_psprintf(r->pool,
"PASV attempt to connect to %pI failed - firewall/NAT?", pasv_addr));
@@ -1474,7 +1474,7 @@ static int proxy_ftp_handler(request_rec
unsigned int h0, h1, h2, h3, p0, p1;
if ((rv = apr_socket_create(&local_sock, connect_addr->family, SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01049)
"error creating local socket");
proxy_ftp_cleanup(r, backend);
return HTTP_INTERNAL_SERVER_ERROR;
@@ -1486,7 +1486,7 @@ static int proxy_ftp_handler(request_rec
if ((rv = apr_socket_opt_set(local_sock, APR_SO_REUSEADDR, one))
!= APR_SUCCESS) {
#ifndef _OSD_POSIX /* BS2000 has this option "always on" */
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01050)
"error setting reuseaddr option");
proxy_ftp_cleanup(r, backend);
return HTTP_INTERNAL_SERVER_ERROR;
@@ -1496,7 +1496,7 @@ static int proxy_ftp_handler(request_rec
apr_sockaddr_info_get(&local_addr, local_ip, APR_UNSPEC, local_port, 0, r->pool);
if ((rv = apr_socket_bind(local_sock, local_addr)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01051)
"error binding to ftp data socket %pI", local_addr);
proxy_ftp_cleanup(r, backend);
return HTTP_INTERNAL_SERVER_ERROR;
@@ -1504,7 +1504,7 @@ static int proxy_ftp_handler(request_rec
/* only need a short queue */
if ((rv = apr_socket_listen(local_sock, 2)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01052)
"error listening to ftp data socket %pI", local_addr);
proxy_ftp_cleanup(r, backend);
return HTTP_INTERNAL_SERVER_ERROR;
@@ -1849,7 +1849,7 @@ static int proxy_ftp_handler(request_rec
break;
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01053)
"failed to accept data connection");
proxy_ftp_cleanup(r, backend);
return HTTP_BAD_GATEWAY;
@@ -1865,7 +1865,7 @@ static int proxy_ftp_handler(request_rec
* the peer reset the connection already; ap_run_create_connection() closed
* the socket
*/
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01054)
"an error occurred creating the transfer connection");
proxy_ftp_cleanup(r, backend);
return HTTP_INTERNAL_SERVER_ERROR;
@@ -1879,7 +1879,7 @@ static int proxy_ftp_handler(request_rec
/* set up the connection filters */
rc = ap_run_pre_connection(data, data_sock);
if (rc != OK && rc != DONE) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01055)
"pre_connection setup failed (%d)", rc);
data->aborted = 1;
proxy_ftp_cleanup(r, backend);
@@ -1917,7 +1917,7 @@ static int proxy_ftp_handler(request_rec
{
apr_off_t readbytes;
apr_brigade_length(bb, 0, &readbytes);
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, APLOGNO(01056)
"proxy: readbytes: %#x", readbytes);
}
#endif
@@ -1939,7 +1939,7 @@ static int proxy_ftp_handler(request_rec
apr_socket_close(data_sock);
}
data_sock = NULL;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01057)
"data connection closed");
/* signal that we must leave */
finish = TRUE;
@@ -1972,7 +1972,7 @@ static int proxy_ftp_handler(request_rec
if (data_sock) {
ap_flush_conn(data);
apr_socket_close(data_sock);
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "data connection closed");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01058) "data connection closed");
}
/* Retrieve the final response for the RETR or LIST commands */
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_http.c?rev=1209766&r1=1209765&r2=1209766&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_http.c Fri Dec 2 23:02:04 2011
@@ -62,7 +62,7 @@ static int proxy_http_canon(request_rec
port = def_port;
err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
if (err) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01083)
"error parsing URL %s: %s", url, err);
return HTTP_BAD_REQUEST;
}
@@ -267,7 +267,7 @@ static int pass_brigade(apr_bucket_alloc
p_conn->worker->s->transferred += transferred;
status = ap_pass_brigade(origin->output_filters, bb);
if (status != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01084)
"pass request body failed to %pI (%s)",
p_conn->addr, p_conn->hostname);
if (origin->aborted) {
@@ -440,7 +440,7 @@ static int stream_reqbody_cl(apr_pool_t
status = apr_strtoff(&cl_val, old_cl_val, &endstr, 10);
if (status || *endstr || endstr == old_cl_val || cl_val < 0) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01085)
"could not parse request Content-Length (%s)",
old_cl_val);
return HTTP_BAD_REQUEST;
@@ -477,7 +477,7 @@ static int stream_reqbody_cl(apr_pool_t
* Prevents HTTP Response Splitting.
*/
if (bytes_streamed > cl_val) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01086)
"read more bytes of request body than expected "
"(got %" APR_OFF_T_FMT ", expected %" APR_OFF_T_FMT ")",
bytes_streamed, cl_val);
@@ -530,7 +530,7 @@ static int stream_reqbody_cl(apr_pool_t
}
if (bytes_streamed != cl_val) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01087)
"client %s given Content-Length did not match"
" number of body bytes read", r->connection->peer_ip);
return HTTP_BAD_REQUEST;
@@ -588,7 +588,7 @@ static int spool_reqbody_cl(apr_pool_t *
* temporary file on disk.
*/
if (bytes_spooled + bytes > limit) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01088)
"Request body is larger than the configured "
"limit of %" APR_OFF_T_FMT, limit);
return HTTP_REQUEST_ENTITY_TOO_LARGE;
@@ -600,7 +600,7 @@ static int spool_reqbody_cl(apr_pool_t *
status = apr_temp_dir_get(&temp_dir, p);
if (status != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01089)
"search for temporary directory failed");
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -609,7 +609,7 @@ static int spool_reqbody_cl(apr_pool_t *
APR_FILEPATH_NATIVE, p);
status = apr_file_mktemp(&tmpfile, template, 0, p);
if (status != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01090)
"creation of temporary file in directory "
"%s failed", temp_dir);
return HTTP_INTERNAL_SERVER_ERROR;
@@ -629,7 +629,7 @@ static int spool_reqbody_cl(apr_pool_t *
if (apr_file_name_get(&tmpfile_name, tmpfile) != APR_SUCCESS) {
tmpfile_name = "(unknown)";
}
- ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01091)
"write to temporary file %s failed",
tmpfile_name);
return HTTP_INTERNAL_SERVER_ERROR;
@@ -781,7 +781,7 @@ int ap_proxy_http_request(apr_pool_t *p,
const char* hostname = apr_table_get(r->headers_in,"Host");
if (!hostname) {
hostname = r->server->server_hostname;
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01092)
"no HTTP 0.9 request (with no host line) "
"on incoming request and preserve host set "
"forcing hostname to be %s for uri %s",
@@ -993,13 +993,13 @@ int ap_proxy_http_request(apr_pool_t *p,
* do not modify add_te_chunked's logic
*/
if (old_te_val && strcasecmp(old_te_val, "chunked") != 0) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01093)
"%s Transfer-Encoding is not supported", old_te_val);
return HTTP_INTERNAL_SERVER_ERROR;
}
if (old_cl_val && old_te_val) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01094)
"client %s (%s) requested Transfer-Encoding "
"chunked body with Content-Length (C-L ignored)",
c->peer_ip, c->remote_host ? c->remote_host: "");
@@ -1023,7 +1023,7 @@ int ap_proxy_http_request(apr_pool_t *p,
AP_MODE_READBYTES, APR_BLOCK_READ,
MAX_MEM_SPOOL - bytes_read);
if (status != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01095)
"prefetch request body failed to %pI (%s)"
" from %s (%s)",
p_conn->addr, p_conn->hostname ? p_conn->hostname: "",
@@ -1045,7 +1045,7 @@ int ap_proxy_http_request(apr_pool_t *p,
*/
status = ap_save_brigade(NULL, &input_brigade, &temp_brigade, p);
if (status != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01096)
"processing prefetched request body failed"
" to %pI (%s) from %s (%s)",
p_conn->addr, p_conn->hostname ? p_conn->hostname: "",
@@ -1185,7 +1185,7 @@ skip_body:
if (rv != OK) {
/* apr_status_t value has been logged in lower level method */
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01097)
"pass request body failed to %pI (%s) from %s (%s)",
p_conn->addr, p_conn->hostname ? p_conn->hostname: "",
c->peer_ip, c->remote_host ? c->remote_host: "");
@@ -1291,14 +1291,14 @@ static void ap_proxy_read_headers(reques
* the first line of the response.
*/
if (saw_headers) {
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01098)
"Starting body due to bogus non-header "
"in headers returned by %s (%s)",
r->uri, r->method);
*pread_len = len;
return ;
} else {
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01099)
"No HTTP headers returned by %s (%s)",
r->uri, r->method);
return ;
@@ -1306,7 +1306,7 @@ static void ap_proxy_read_headers(reques
}
}
/* this is the psc->badopt == bad_ignore case */
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01100)
"Ignoring bogus HTTP header returned by %s (%s)",
r->uri, r->method);
continue;
@@ -1434,7 +1434,7 @@ apr_status_t ap_proxy_http_process_respo
apr_status_t rc;
rc = apr_socket_timeout_set(backend->sock, worker->s->ping_timeout);
if (rc != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, APLOGNO(01101)
"could not set 100-Continue timeout");
}
}
@@ -1463,11 +1463,11 @@ apr_status_t ap_proxy_http_process_respo
rc = ap_proxygetline(tmp_bb, buffer, sizeof(buffer), backend->r, 0, &len);
}
if (len <= 0) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, APLOGNO(01102)
"error reading status line from remote "
"server %s:%d", backend->hostname, backend->port);
if (APR_STATUS_IS_TIMEUP(rc)) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "read timeout");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01103) "read timeout");
if (do_100_continue) {
return ap_proxyerror(r, HTTP_SERVICE_UNAVAILABLE, "Timeout on 100-Continue");
}
@@ -1487,7 +1487,7 @@ apr_status_t ap_proxy_http_process_respo
!APR_STATUS_IS_TIMEUP(rc)) {
apr_bucket *eos;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01104)
"Closing connection to client because"
" reading from backend server %s:%d failed."
" Number of keepalives %i", backend->hostname,
@@ -1522,7 +1522,7 @@ apr_status_t ap_proxy_http_process_respo
return OK;
}
else if (!c->keepalives) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01105)
"NOT Closing connection to client"
" although reading from backend server %s:%d"
" failed.",
@@ -1593,7 +1593,7 @@ apr_status_t ap_proxy_http_process_respo
&pread_len);
if (r->headers_out == NULL) {
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01106)
"bad HTTP/%d.%d header returned by %s (%s)",
major, minor, r->uri, r->method);
backend->close += 1;
@@ -1633,7 +1633,7 @@ apr_status_t ap_proxy_http_process_respo
* XXX: We aught to treat such a response as uncachable
*/
apr_table_unset(r->headers_out, "Content-Length");
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01107)
"server %s:%d returned Transfer-Encoding"
" and Content-Length",
backend->hostname, backend->port);
@@ -1740,7 +1740,7 @@ apr_status_t ap_proxy_http_process_respo
* policies and maybe also add option to bail out with 502
*/
else if (strcasecmp(policy, "Suppress")) {
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01108)
"undefined proxy interim response policy");
}
}
@@ -1754,7 +1754,7 @@ apr_status_t ap_proxy_http_process_respo
if ((buf = apr_table_get(r->headers_out, wa))) {
apr_table_set(r->err_headers_out, wa, buf);
} else {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01109)
"origin server sent 401 without "
"WWW-Authenticate header");
}
@@ -1878,7 +1878,7 @@ apr_status_t ap_proxy_http_process_respo
* our backend bailed on us. Pass along a 502 error
* error bucket
*/
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01110)
"error reading response");
ap_proxy_backend_broke(r, bb);
ap_pass_brigade(r->output_filters, bb);
@@ -1893,7 +1893,7 @@ apr_status_t ap_proxy_http_process_respo
backend->worker->s->read += readbytes;
#if DEBUGGING
{
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01111)
"readbytes: %#x", readbytes);
}
#endif
@@ -2051,7 +2051,7 @@ static int proxy_http_handler(request_re
/* is it for us? */
if (strcmp(scheme, "https") == 0) {
if (!ap_proxy_ssl_enable(NULL)) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01112)
"HTTPS: declining URL %s (mod_ssl not configured?)",
url);
return DECLINED;
@@ -2060,7 +2060,7 @@ static int proxy_http_handler(request_re
proxy_function = "HTTPS";
}
else if (!(strcmp(scheme, "http") == 0 || (strcmp(scheme, "ftp") == 0 && proxyname))) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "HTTP: declining URL %s",
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01113) "HTTP: declining URL %s",
url);
return DECLINED; /* only interested in HTTP, or FTP via proxy */
}
@@ -2110,7 +2110,7 @@ static int proxy_http_handler(request_re
/* Step Two: Make the Connection */
if (ap_proxy_connect_backend(proxy_function, backend, worker, r->server)) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01114)
"HTTP: failed to make connection to backend: %s",
backend->hostname);
status = HTTP_SERVICE_UNAVAILABLE;
@@ -2141,7 +2141,7 @@ static int proxy_http_handler(request_re
conf, uri, locurl, server_portstr)) != OK) {
if ((status == HTTP_SERVICE_UNAVAILABLE) && worker->s->ping_timeout_set) {
backend->close = 1;
- ap_log_rerror(APLOG_MARK, APLOG_INFO, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, status, r, APLOGNO(01115)
"HTTP: 100-Continue failed to %pI (%s)",
worker->cp->addr, worker->s->hostname);
retry++;
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c?rev=1209766&r1=1209765&r2=1209766&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c Fri Dec 2 23:02:04 2011
@@ -184,7 +184,7 @@ static int scgi_canon(request_rec *r, ch
err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
if (err) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00857)
"error parsing URL %s: %s", url, err);
return HTTP_BAD_REQUEST;
}
@@ -224,7 +224,7 @@ static int sendall(proxy_conn_rec *conn,
while (length > 0) {
written = length;
if ((rv = apr_socket_send(conn->sock, buf, &written)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00858)
"sending data to %s:%u failed",
conn->hostname, conn->port);
return HTTP_SERVICE_UNAVAILABLE;
@@ -335,7 +335,7 @@ static int send_request_body(request_rec
readlen = ap_get_client_block(r, buf, AP_IOBUFSIZE);
}
if (readlen == -1) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00859)
"receiving request body failed");
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -370,7 +370,7 @@ static int pass_response(request_rec *r,
status = ap_scan_script_header_err_brigade_ex(r, bb, NULL,
APLOG_MODULE_INDEX);
if (status != OK) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00860)
"error reading response headers from %s:%u",
conn->hostname, conn->port);
r->status_line = NULL;
@@ -390,7 +390,7 @@ static int pass_response(request_rec *r,
if (location) {
scgi_request_config *req_conf = apr_palloc(r->pool,
sizeof(*req_conf));
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00861)
"Found %s: %s - preparing subrequest.",
conf->sendfile, location);
@@ -441,7 +441,7 @@ static int scgi_request_status(int *stat
&proxy_scgi_module))) {
switch (req_conf->type) {
case scgi_internal_redirect:
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00862)
"Internal redirect to %s", req_conf->location);
r->status_line = NULL;
@@ -456,7 +456,7 @@ static int scgi_request_status(int *stat
/* break; */
case scgi_sendfile:
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00863)
"File subrequest to %s", req_conf->location);
do {
request_rec *rr;
@@ -472,7 +472,7 @@ static int scgi_request_status(int *stat
ap_run_sub_req(rr);
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00864)
"Subrequest to file '%s' not possible. "
"(rr->status=%d, rr->finfo.filetype=%d)",
req_conf->location, rr->status,
@@ -505,7 +505,7 @@ static int scgi_handler(request_rec *r,
char dummy;
if (strncasecmp(url, SCHEME "://", sizeof(SCHEME) + 2)) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00865)
"declining URL %s", url);
return DECLINED;
}
@@ -528,7 +528,7 @@ static int scgi_handler(request_rec *r,
/* Step Two: Make the Connection */
if (ap_proxy_connect_backend(__FUNCTION__, backend, worker, r->server)) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00866)
"failed to make connection to backend: %s:%u",
backend->hostname, backend->port);
status = HTTP_SERVICE_UNAVAILABLE;