"TRACE forbidden by server configuration");
apr_table_setn(r->notes, "verbose-error-to", "*");
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
- "proxy: TRACE forbidden by server configuration");
+ "TRACE forbidden by server configuration");
return HTTP_METHOD_NOT_ALLOWED;
}
"TRACE with request body is not allowed");
apr_table_setn(r->notes, "verbose-error-to", "*");
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
- "proxy: TRACE with request body is not allowed");
+ "TRACE with request body is not allowed");
return HTTP_REQUEST_ENTITY_TOO_LARGE;
}
}
strlen(ents[i].scheme)) == 0)) {
/* handle the scheme */
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "Trying to run scheme_handler against proxy");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "Trying to run scheme_handler against proxy");
access_status = proxy_run_scheme_handler(r, worker,
conf, url,
ents[i].hostname,
*/
/* handle the scheme */
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "Running scheme %s handler (attempt %d)",
- scheme, attempts);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "Running scheme %s handler (attempt %d)",
+ scheme, attempts);
AP_PROXY_RUN(r, worker, conf, url, attempts);
access_status = proxy_run_scheme_handler(r, worker, conf,
url, NULL, 0);
max_attempts > attempts++);
if (DECLINED == access_status) {
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
- "proxy: No protocol handler was valid for the URL %s. "
- "If you are using a DSO version of mod_proxy, make sure "
- "the proxy submodules are included in the configuration "
- "using LoadModule.", r->uri);
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ "No protocol handler was valid for the URL %s. "
+ "If you are using a DSO version of mod_proxy, make sure "
+ "the proxy submodules are included in the configuration "
+ "using LoadModule.", r->uri);
access_status = HTTP_INTERNAL_SERVER_ERROR;
goto cleanup;
}
}
ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
- "proxy: AJP: canonicalising URL %s", url);
+ "AJP: canonicalising URL %s", url);
/*
* do syntactic check.
if (status != APR_SUCCESS) {
conn->close++;
ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: AJP: request failed to %pI (%s)",
+ "AJP: request failed to %pI (%s)",
conn->worker->cp->addr,
conn->worker->s->hostname);
if (status == AJP_EOVERFLOW)
/* We had a failure: Close connection to backend */
conn->close++;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: ajp_alloc_data_msg failed");
+ "ajp_alloc_data_msg failed");
return HTTP_INTERNAL_SERVER_ERROR;
}
if (tenc && (strcasecmp(tenc, "chunked") == 0)) {
/* The AJP protocol does not want body data yet */
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: request is chunked");
+ "request is chunked");
} else {
/* Get client provided Content-Length header */
content_length = get_content_length(r);
/* We had a failure: Close connection to backend */
conn->close++;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: ap_get_brigade failed");
+ "ap_get_brigade failed");
apr_brigade_destroy(input_brigade);
return HTTP_BAD_REQUEST;
}
/* have something */
if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(input_brigade))) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: APR_BUCKET_IS_EOS");
+ "APR_BUCKET_IS_EOS");
}
/* Try to send something */
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: data to read (max %" APR_SIZE_T_FMT
+ "data to read (max %" APR_SIZE_T_FMT
" at %" APR_SIZE_T_FMT ")", bufsiz, msg->pos);
status = apr_brigade_flatten(input_brigade, buff, &bufsiz);
conn->close++;
apr_brigade_destroy(input_brigade);
ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: apr_brigade_flatten");
+ "apr_brigade_flatten");
return HTTP_INTERNAL_SERVER_ERROR;
}
apr_brigade_cleanup(input_brigade);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: got %" APR_SIZE_T_FMT " bytes of data", bufsiz);
+ "got %" APR_SIZE_T_FMT " bytes of data", bufsiz);
if (bufsiz > 0) {
status = ajp_send_data_msg(conn->sock, msg, bufsiz);
ajp_msg_log(r, msg, "First ajp_send_data_msg: ajp_ilink_send packet dump");
conn->close++;
apr_brigade_destroy(input_brigade);
ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: send failed to %pI (%s)",
+ "send failed to %pI (%s)",
conn->worker->cp->addr,
conn->worker->s->hostname);
/*
}
else if (content_length > 0) {
ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: read zero bytes, expecting"
+ "read zero bytes, expecting"
" %" APR_OFF_T_FMT " bytes",
content_length);
/*
conn->close++;
apr_brigade_destroy(input_brigade);
ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: read response failed from %pI (%s)",
+ "read response failed from %pI (%s)",
conn->worker->cp->addr,
conn->worker->s->hostname);
bufsiz = 0;
havebody = 0;
ap_log_error(APLOG_MARK, APLOG_DEBUG, status, r->server,
- "proxy: APR_BUCKET_IS_EOS");
+ "APR_BUCKET_IS_EOS");
} else {
status = ap_get_brigade(r->input_filters, input_brigade,
AP_MODE_READBYTES,
*/
backend_failed = 1;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: Backend sent headers twice.");
+ "Backend sent headers twice.");
break;
}
/* AJP13_SEND_HEADERS: process them */
if (ap_pass_brigade(r->output_filters,
output_brigade) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "proxy: error processing body.%s",
+ "error processing body.%s",
r->connection->aborted ?
" Client aborted connection." : "");
output_failed = 1;
if (ap_pass_brigade(r->output_filters,
output_brigade) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "proxy: error processing end");
+ "error processing end");
output_failed = 1;
}
/* XXX: what about flush here? See mod_jk */
if (backend_failed || output_failed) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: Processing of request failed backend: %i, "
+ "Processing of request failed backend: %i, "
"output: %i", backend_failed, output_failed);
/* We had a failure: Close connection to backend */
conn->close++;
}
else if (!request_ended) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: Processing of request didn't terminate cleanly");
+ "Processing of request didn't terminate cleanly");
/* We had a failure: Close connection to backend */
conn->close++;
backend_failed = 1;
}
else {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: got response from %pI (%s)",
+ "got response from %pI (%s)",
conn->worker->cp->addr,
conn->worker->s->hostname);
if (backend_failed) {
ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: dialog to %pI (%s) failed",
+ "dialog to %pI (%s) failed",
conn->worker->cp->addr,
conn->worker->s->hostname);
/*
if (strncasecmp(url, "ajp:", 4) != 0) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: AJP: declining URL %s", url);
+ "AJP: declining URL %s", url);
return DECLINED;
}
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: AJP: serving URL %s", url);
+ "AJP: serving URL %s", url);
/* create space for state information */
status = ap_proxy_acquire_connection(scheme, &backend, worker,
/* Step Two: Make the Connection */
if (ap_proxy_connect_backend(scheme, backend, worker, r->server)) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: AJP: failed to make connection to backend: %s",
+ "AJP: failed to make connection to backend: %s",
backend->hostname);
status = HTTP_SERVICE_UNAVAILABLE;
break;
if (status != APR_SUCCESS) {
backend->close++;
ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: AJP: cping/cpong failed to %pI (%s)",
+ "AJP: cping/cpong failed to %pI (%s)",
worker->cp->addr,
worker->s->hostname);
status = HTTP_SERVICE_UNAVAILABLE;
return DECLINED;
}
- ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
- "proxy: BALANCER: canonicalising URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "canonicalising URL %s", url);
/* do syntatic check.
* We break the URL into host, port, path, search
/* 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_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: BALANCER: Found value %s for "
- "stickysession %s", *route, balancer->s->sticky_path);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "Found value %s for stickysession %s",
+ *route, balancer->s->sticky_path);
*sticky_used = balancer->s->sticky_path;
}
else {
*route = get_cookie_param(r, balancer->s->sticky);
if (*route) {
*sticky_used = balancer->s->sticky;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: BALANCER: Found value %s for "
- "stickysession %s", *route, balancer->s->sticky);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "Found value %s for stickysession %s",
+ *route, balancer->s->sticky);
}
}
/*
if ((*route) && ((*route = strchr(*route, '.')) != NULL ))
(*route)++;
if ((*route) && (**route)) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: BALANCER: Found route %s", *route);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Found route %s", *route);
/* We have a route in path or in cookie
* Find the worker that has this route defined.
*/
* the route supplied by the client.
*/
apr_table_setn(r->subprocess_env, "BALANCER_ROUTE_CHANGED", "1");
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: BALANCER: Route changed from %s to %s",
- *route, worker->s->route);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "Route changed from %s to %s",
+ *route, worker->s->route);
}
return worker;
}
apr_status_t rv;
if ((rv = PROXY_THREAD_LOCK(balancer)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Lock failed for find_best_worker()", balancer->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Lock failed for find_best_worker()",
+ balancer->name);
return NULL;
}
candidate->s->elected++;
if ((rv = PROXY_THREAD_UNLOCK(balancer)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Unlock failed for find_best_worker()", balancer->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Unlock failed for find_best_worker()",
+ balancer->name);
}
if (candidate == NULL) {
++(*worker)->s->retries;
(*worker)->s->status &= ~PROXY_WORKER_IN_ERROR;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "proxy: BALANCER: (%s). Forcing recovery for worker (%s)",
+ "%s: Forcing recovery for worker (%s)",
balancer->name, (*worker)->s->hostname);
}
}
* XXX: perhaps we need the process lock here
*/
if ((rv = PROXY_THREAD_LOCK(*balancer)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Lock failed for pre_request",
- (*balancer)->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Lock failed for pre_request", (*balancer)->name);
return DECLINED;
}
workers++;
}
if (member_of) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: BALANCER: (%s). All workers are in error state for route (%s)",
- (*balancer)->name, route);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "%s: All workers are in error state for route (%s)",
+ (*balancer)->name, route);
if ((rv = PROXY_THREAD_UNLOCK(*balancer)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Unlock failed for pre_request",
- (*balancer)->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Unlock failed for pre_request",
+ (*balancer)->name);
}
return HTTP_SERVICE_UNAVAILABLE;
}
}
if ((rv = PROXY_THREAD_UNLOCK(*balancer)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Unlock failed for pre_request",
- (*balancer)->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Unlock failed for pre_request",
+ (*balancer)->name);
}
if (!*worker) {
runtime = find_best_worker(*balancer, r);
if (!runtime) {
if ((*balancer)->workers->nelts) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: BALANCER: (%s). All workers are in error state",
- (*balancer)->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "%s: All workers are in error state",
+ (*balancer)->name);
} else {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: BALANCER: (%s). No workers in balancer",
- (*balancer)->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "%s: No workers in balancer",
+ (*balancer)->name);
}
return HTTP_SERVICE_UNAVAILABLE;
apr_table_setn(r->subprocess_env,
"BALANCER_SESSION_ROUTE", route);
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: BALANCER (%s) worker (%s) rewritten to %s",
- (*balancer)->name, (*worker)->s->name, *url);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "%s: worker (%s) rewritten to %s",
+ (*balancer)->name, (*worker)->s->name, *url);
return access_status;
}
apr_status_t rv;
if ((rv = PROXY_THREAD_LOCK(balancer)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Lock failed for post_request",
- balancer->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Lock failed for post_request",
+ balancer->name);
return HTTP_INTERNAL_SERVER_ERROR;
}
for (i = 0; i < balancer->errstatuses->nelts; i++) {
int val = ((int *)balancer->errstatuses->elts)[i];
if (r->status == val) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Forcing recovery for worker (%s), failonstatus %d",
- balancer->name, worker->s->name, val);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Forcing recovery for worker (%s), "
+ "failonstatus %d",
+ balancer->name, worker->s->name, val);
worker->s->status |= PROXY_WORKER_IN_ERROR;
worker->s->error_time = apr_time_now();
break;
}
if ((rv = PROXY_THREAD_UNLOCK(balancer)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Unlock failed for post_request",
- balancer->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Unlock failed for post_request", balancer->name);
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy_balancer_post_request for (%s)", balancer->name);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "proxy_balancer_post_request for (%s)", balancer->name);
if (worker && worker->s->busy)
worker->s->busy--;
storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared",
AP_SLOTMEM_PROVIDER_VERSION);
if (!storage) {
- ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
"ap_lookup_provider %s failed: is mod_slotmem_shm loaded??",
AP_SLOTMEM_PROVIDER_GROUP);
return !OK;
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_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Lock failed for balancer_handler",
- balancer->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Lock failed for balancer_handler",
+ balancer->name);
}
ap_proxy_sync_balancer(balancer, r->server, conf);
if ((rv = PROXY_THREAD_UNLOCK(balancer)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Unlock failed for balancer_handler",
- balancer->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Unlock failed for balancer_handler",
+ balancer->name);
}
}
if (r->args && (r->method_number == M_GET)) {
const char *allowed[] = { "w", "b", "nonce", NULL };
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "parsing r->args");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "parsing r->args");
push2table(r->args, params, allowed, r->pool);
}
const char *val;
int was_usable = PROXY_WORKER_IS_USABLE(wsel);
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "settings worker params");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "settings worker params");
if ((val = apr_table_get(params, "w_lf"))) {
int ival = atoi(val);
if (bsel && ok2change) {
const char *val;
int ival;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "settings balancer params");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "settings balancer params");
if ((val = apr_table_get(params, "b_lbm"))) {
if ((strlen(val) < (sizeof(bsel->s->lbpname)-1)) &&
strcmp(val, bsel->s->lbpname)) {
nworker = ap_proxy_get_worker(conf->pool, bsel, conf, val);
if (!nworker && storage->num_free_slots(bsel->slot)) {
if ((rv = PROXY_GLOBAL_LOCK(bsel)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Lock failed for adding worker",
- bsel->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Lock failed for adding worker",
+ bsel->name);
}
ret = ap_proxy_define_worker(conf->pool, &nworker, bsel, conf, val, 0);
if (!ret) {
proxy_worker_shared *shm;
PROXY_COPY_CONF_PARAMS(nworker, conf);
if ((rv = storage->grab(bsel->slot, &index)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, rv, r->server, "worker slotmem_grab failed");
+ ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r,
+ "worker slotmem_grab failed");
if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Unlock failed for adding worker",
- bsel->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Unlock failed for adding worker",
+ bsel->name);
}
return HTTP_BAD_REQUEST;
}
if ((rv = storage->dptr(bsel->slot, index, (void *)&shm)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, rv, r->server, "worker slotmem_dptr failed");
+ ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r,
+ "worker slotmem_dptr failed");
if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Unlock failed for adding worker",
- bsel->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Unlock failed for adding worker",
+ bsel->name);
}
return HTTP_BAD_REQUEST;
}
if ((rv = ap_proxy_share_worker(nworker, shm, index)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, rv, r->server, "Cannot share worker");
+ ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r,
+ "Cannot share worker");
if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Unlock failed for adding worker",
- bsel->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Unlock failed for adding worker",
+ bsel->name);
}
return HTTP_BAD_REQUEST;
}
if ((rv = ap_proxy_initialize_worker(nworker, r->server, conf->pool)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_EMERG, rv, r->server, "Cannot init worker");
+ ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r,
+ "Cannot init worker");
if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Unlock failed for adding worker",
- bsel->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Unlock failed for adding worker",
+ bsel->name);
}
return HTTP_BAD_REQUEST;
}
ap_proxy_set_wstatus('D', 1, nworker);
}
if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: BALANCER: (%s). Unlock failed for adding worker",
- bsel->name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "%s: Unlock failed for adding worker",
+ bsel->name);
}
}
}
action = ap_construct_url(r->pool, r->uri, r);
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "genning page");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "genning page");
if (apr_table_get(params, "xml")) {
ap_set_content_type(r, "text/xml");
unsigned int num;
storage->attach(&(conf->slot), conf->id, &size, &num, p);
if (!conf->slot) {
- ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s, "slotmem_attach failed");
+ ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, "slotmem_attach failed");
exit(1); /* Ugly, but what else? */
}
}
if (r->method_number != M_CONNECT) {
return DECLINED;
}
- ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
- "proxy: CONNECT: canonicalising URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "canonicalising URL %s", url);
return OK;
}
len = -1;
apr_brigade_length(bb, 0, &len);
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "proxy: CONNECT: read %" APR_OFF_T_FMT
+ "read %" APR_OFF_T_FMT
" bytes from %s", len, name);
#endif
rv = ap_pass_brigade(c_o->output_filters, bb);
}
else {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: CONNECT: error on %s - ap_pass_brigade",
+ "error on %s - ap_pass_brigade",
name);
}
} else if (!APR_STATUS_IS_EAGAIN(rv)) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
- "proxy: CONNECT: error on %s - ap_get_brigade",
+ "error on %s - ap_get_brigade",
name);
}
} while (rv == APR_SUCCESS);
/* is this for us? */
if (r->method_number != M_CONNECT) {
- ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
- "proxy: CONNECT: declining URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "declining URL %s", url);
return DECLINED;
}
- ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
- "proxy: CONNECT: serving URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "serving URL %s", url);
/*
NULL));
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: CONNECT: connecting %s to %s:%d", url, uri.hostname,
- uri.port);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "connecting %s to %s:%d", url, uri.hostname, uri.port);
/* do a DNS lookup for the destination host */
err = apr_sockaddr_info_get(&uri_addr, uri.hostname, APR_UNSPEC, uri.port,
connectport = uri.port;
connect_addr = uri_addr;
}
- ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
- "proxy: CONNECT: connecting to remote proxy %s on port %d",
- connectname, connectport);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
+ "connecting to remote proxy %s on port %d",
+ connectname, connectport);
/* check if ProxyBlock directive on this host */
if (OK != ap_proxy_checkproxyblock(r, conf, uri_addr)) {
}
/* setup polling for connection */
- ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
- "proxy: CONNECT: setting up poll()");
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "setting up poll()");
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,
- "proxy: CONNECT: error apr_pollset_create()");
+ "error apr_pollset_create()");
return HTTP_INTERNAL_SERVER_ERROR;
}
if (!backconn) {
/* peer reset */
ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
- "proxy: an error occurred creating a new connection "
+ "an error occurred creating a new connection "
"to %pI (%s)", connect_addr, connectname);
apr_socket_close(sock);
return HTTP_INTERNAL_SERVER_ERROR;
if (rc != OK && rc != DONE) {
backconn->aborted = 1;
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "proxy: CONNECT: pre_connection setup failed (%d)", rc);
+ "pre_connection setup failed (%d)", rc);
return HTTP_INTERNAL_SERVER_ERROR;
}
ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
- "proxy: CONNECT: connection complete to %pI (%s)",
+ "connection complete to %pI (%s)",
connect_addr, connectname);
apr_table_setn(r->notes, "proxy-source-port", apr_psprintf(r->pool, "%hu",
backconn->local_addr->port));
if (proxyport) {
/* FIXME: Error checking ignored.
*/
- ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
- "proxy: CONNECT: sending the CONNECT request"
- " to the remote proxy");
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
+ "sending the CONNECT request to the remote proxy");
ap_fprintf(backconn->output_filters, bb,
"CONNECT %s HTTP/1.0" CRLF, r->uri);
ap_fprintf(backconn->output_filters, bb,
ap_fflush(backconn->output_filters, bb);
}
else {
- ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
- "proxy: CONNECT: Returning 200 OK Status");
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "Returning 200 OK");
nbytes = apr_snprintf(buffer, sizeof(buffer),
"HTTP/1.0 200 Connection Established" CRLF);
ap_xlate_proto_to_ascii(buffer, nbytes);
#endif
}
- ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
- "proxy: CONNECT: setting up poll()");
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "setting up poll()");
/*
* Step Four: Handle Data Transfer
continue;
}
apr_socket_close(sock);
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "proxy: CONNECT: error apr_poll()");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "error apr_poll()");
return HTTP_INTERNAL_SERVER_ERROR;
}
#ifdef DEBUGGING
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: CONNECT: woke from poll(), i=%d", pollcnt);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "woke from poll(), i=%d", pollcnt);
#endif
for (pi = 0; pi < pollcnt; pi++) {
if (pollevent & APR_POLLIN) {
#ifdef DEBUGGING
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "proxy: CONNECT: sock was readable");
+ "sock was readable");
#endif
rv = proxy_connect_transfer(r, backconn, c, bb, "sock");
}
|| (pollevent & APR_POLLHUP)) {
rv = APR_EPIPE;
ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r,
- "proxy: CONNECT: err/hup on backconn");
+ "err/hup on backconn");
}
if (rv != APR_SUCCESS)
client_error = 1;
if (pollevent & APR_POLLIN) {
#ifdef DEBUGGING
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "proxy: CONNECT: client was readable");
+ "client was readable");
#endif
rv = proxy_connect_transfer(r, c, backconn, bb, "client");
}
else {
rv = APR_EBADF;
ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
- "proxy: CONNECT: unknown socket in pollset");
+ "unknown socket in pollset");
}
}
}
}
- ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
- "proxy: CONNECT: finished with poll() - cleaning up");
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
+ "finished with poll() - cleaning up");
/*
* Step Five: Clean Up
return DECLINED;
}
- ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
- "proxy: FCGI: canonicalising URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
+ "canonicalising URL %s", url);
err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
if (err) {
path, NULL);
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "proxy: FCGI: set r->filename to %s", r->filename);
+ "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,
- "proxy: FCGI: set r->path_info to %s", r->path_info);
+ "set r->path_info to %s", r->path_info);
}
return OK;
#ifdef FCGI_DUMP_ENV_VARS
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "proxy: FCGI: sending env var '%s' value '%s'",
+ "sending env var '%s' value '%s'",
elts[i].key, elts[i].val);
#endif
/* 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,
- "proxy: FCGI: truncating environment to %d bytes and %d elements",
+ "truncating environment to %d bytes and %d elements",
(int)bodylen, i);
break;
}
if (i >= 20) {
i = 0;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "HEADER: %s %s", asc_line, hex_line);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "HEADER: %s %s", asc_line, hex_line);
memset(asc_line, 0, sizeof(asc_line));
memset(hex_line, 0, sizeof(hex_line));
}
if (i != 1) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "HEADER: %s %s",
- asc_line, hex_line);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "HEADER: %s %s",
+ asc_line, hex_line);
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "HEADER: -EOH-");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "HEADER: -EOH-");
#endif
}
dump_header_to_log(r, farray, readbuflen);
if (readbuflen != FCGI_HEADER_LEN) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: FCGI: Failed to read entire header "
- "got %" APR_SIZE_T_FMT " wanted %d",
- readbuflen, FCGI_HEADER_LEN);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "Failed to read entire header "
+ "got %" APR_SIZE_T_FMT " wanted %d",
+ readbuflen, FCGI_HEADER_LEN);
rv = APR_EINVAL;
break;
}
fcgi_header_from_array(&header, farray);
if (header.version != FCGI_VERSION) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: FCGI: Got bogus version %d",
- (int) header.version);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "Got bogus version %d", (int) header.version);
rv = APR_EINVAL;
break;
}
rid |= header.requestIdB0;
if (rid != request_id) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: FCGI: Got bogus rid %d, expected %d",
- rid, request_id);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "Got bogus rid %d, expected %d",
+ rid, request_id);
rv = APR_EINVAL;
break;
}
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_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: FCGI: Error parsing script headers");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "Error parsing script headers");
r->status = status;
rv = APR_EINVAL;
break;
case FCGI_STDERR:
/* TODO: Should probably clean up this logging a bit... */
if (clen) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: FCGI: Got error '%s'", readbuf);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "Got error '%s'", readbuf);
}
if (clen > readbuflen) {
break;
default:
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: FCGI: Got bogus record %d", type);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "Got bogus record %d", type);
break;
}
/* Step 1: Send FCGI_BEGIN_REQUEST */
rv = send_begin_request(conn, request_id);
if (rv != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: FCGI: Failed Writing Request to %s:",
- server_portstr);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "Failed Writing Request to %s:", server_portstr);
conn->close = 1;
return HTTP_SERVICE_UNAVAILABLE;
}
/* Step 2: Send Environment via FCGI_PARAMS */
rv = send_environment(conn, r, request_id);
if (rv != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: FCGI: Failed writing Environment to %s:",
- server_portstr);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "Failed writing Environment to %s:", server_portstr);
conn->close = 1;
return HTTP_SERVICE_UNAVAILABLE;
}
/* 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_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: FCGI: Error dispatching request to %s:",
- server_portstr);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "Error dispatching request to %s:", server_portstr);
conn->close = 1;
return HTTP_SERVICE_UNAVAILABLE;
}
apr_uri_t *uri = apr_palloc(r->pool, sizeof(*uri));
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: FCGI: url: %s proxyname: %s proxyport: %d",
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "url: %s proxyname: %s proxyport: %d",
url, proxyname, proxyport);
if (strncasecmp(url, "fcgi:", 5) == 0) {
url += 5;
}
else {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: FCGI: declining URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "declining URL %s", url);
return DECLINED;
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: FCGI: serving URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "serving URL %s", url);
/* Create space for state information */
if (! backend) {
/* Step Two: Make the Connection */
if (ap_proxy_connect_backend(FCGI_SCHEME, backend, worker, r->server)) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: FCGI: failed to make connection to backend: %s",
- backend->hostname);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "failed to make connection to backend: %s",
+ backend->hostname);
status = HTTP_SERVICE_UNAVAILABLE;
goto cleanup;
}
r->filename = apr_pstrcat(r->pool, "proxy:fd://", path, NULL);
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "proxy: FD: set r->filename to %s", r->filename);
+ "set r->filename to %s", r->filename);
return OK;
}
if (rv != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: FD: Failed to connect to '%s'",
- url);
+ "Failed to connect to '%s'", url);
return HTTP_INTERNAL_SERVER_ERROR;
}
if (!flush) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: FD: Unable to find configured flush "
- "provider '%s'", flush_method);
+ "Unable to find configured flush provider '%s'",
+ flush_method);
return HTTP_INTERNAL_SERVER_ERROR;
}
rv = send_socket(r->pool, sock, clientsock);
if (rv != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: FD: send_socket failed:");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "send_socket failed:");
return HTTP_INTERNAL_SERVER_ERROR;
}
r->connection->pool);
if (rv != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: FD: failed to create dummy socket");
+ "failed to create dummy socket");
return HTTP_INTERNAL_SERVER_ERROR;
}
ap_set_core_module_config(r->connection->conn_config, dummy);
if (status != OK) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
- "proxy: FD: ap_pass_brigade failed:");
+ "ap_pass_brigade failed:");
return status;
}
}
def_port = apr_uri_port_of_scheme("ftp");
- ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
- "proxy: FTP: canonicalising URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "canonicalising URL %s", url);
port = def_port;
err = ap_proxy_canon_netloc(p, &url, &user, &password, &host, &port);
}
/*
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
- "proxy: <FTP: %s", response);
+ "<%s", response);
*/
if (!apr_isdigit(response[0]) || !apr_isdigit(response[1]) ||
!apr_isdigit(response[2]) || (response[3] != ' ' && response[3] != '-'))
filename = strrchr(ctx->buffer, ' ');
if (filename == NULL) {
/* Line is broken. Ignore it. */
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
- "proxy_ftp: could not parse line %s", ctx->buffer);
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ "proxy_ftp: could not parse line %s",
+ ctx->buffer);
/* erase buffer for next time around */
ctx->buffer[0] = 0;
continue; /* while state is BODY */
*crlf = '\0';
if (strncmp(message,"PASS ", 5) == 0)
strcpy(&message[5], "****");
- ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
- "proxy:>FTP: %s", message);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, ">%s", message);
}
rc = ftp_getrc_msg(ftp_ctrl, bb, message, sizeof message);
if ((crlf = strchr(message, '\r')) != NULL ||
(crlf = strchr(message, '\n')) != NULL)
*crlf = '\0';
- ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
- "proxy:<FTP: %3.3u %s", rc, message);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "<%3.3u %s", rc, message);
if (pmessage != NULL)
*pmessage = apr_pstrdup(r->pool, message);
*/
if (log_it)
ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
- "proxy: missing or failed auth to %s",
+ "missing or failed auth to %s",
apr_uri_unparse(r->pool,
&r->parsed_uri, APR_URI_UNP_OMITPATHINFO));
/* is this for us? */
if (proxyhost) {
- ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
- "proxy: FTP: declining URL %s - proxyhost %s specified:", url, proxyhost);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
+ "declining URL %s - proxyhost %s specified:", url,
+ proxyhost);
return DECLINED; /* proxy connections are via HTTP */
}
if (strncasecmp(url, "ftp:", 4)) {
- ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
- "proxy: FTP: declining URL %s - not ftp:", url);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
+ "declining URL %s - not ftp:", url);
return DECLINED; /* only interested in FTP */
}
- ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
- "proxy: FTP: serving URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r, "serving URL %s", url);
/*
password = "apache-proxy@";
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: FTP: connecting %s to %s:%d", url, connectname, connectport);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "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_error(APLOG_MARK, APLOG_ERR, err, r->server,
- "proxy: FTP: lock");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, err, r, "lock");
return HTTP_INTERNAL_SERVER_ERROR;
}
}
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_error(APLOG_MARK, APLOG_ERR, uerr, r->server,
- "proxy: FTP: unlock");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, uerr, r, "unlock");
}
}
/*
if (ap_proxy_connect_backend("FTP", backend, worker, r->server)) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: FTP: an error occurred creating a new connection to %pI (%s)",
- connect_addr, connectname);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "an error occurred creating a new connection to %pI (%s)",
+ connect_addr, connectname);
proxy_ftp_cleanup(r, backend);
return HTTP_SERVICE_UNAVAILABLE;
}
origin = backend->connection;
sock = backend->sock;
- ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
- "proxy: FTP: control connection complete");
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
+ "control connection complete");
/*
if (data_port) {
apr_sockaddr_t *epsv_addr;
- ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
- "proxy: FTP: EPSV contacting remote host on port %d",
- data_port);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
+ "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,
- "proxy: FTP: error creating EPSV socket");
+ "error creating EPSV socket");
proxy_ftp_cleanup(r, backend);
return HTTP_INTERNAL_SERVER_ERROR;
}
&& (rv = apr_socket_opt_set(data_sock, APR_SO_RCVBUF,
conf->recv_buffer_size))) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: FTP: apr_socket_opt_set(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default");
+ "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,
- "apr_socket_opt_set(APR_TCP_NODELAY): Failed to set");
+ "apr_socket_opt_set(APR_TCP_NODELAY): "
+ "Failed to set");
}
/* make the connection */
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_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: FTP: EPSV attempt to connect to %pI failed - Firewall/NAT?", epsv_addr);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "EPSV attempt to connect to %pI failed - "
+ "Firewall/NAT?", epsv_addr);
return ftp_proxyerror(r, backend, HTTP_BAD_GATEWAY, apr_psprintf(r->pool,
"EPSV attempt to connect to %pI failed - firewall/NAT?", epsv_addr));
}
apr_sockaddr_t *pasv_addr;
apr_port_t pasvport = (p1 << 8) + p0;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: FTP: PASV contacting host %d.%d.%d.%d:%d",
- h3, h2, h1, h0, pasvport);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "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,
- "proxy: error creating PASV socket");
+ "error creating PASV socket");
proxy_ftp_cleanup(r, backend);
return HTTP_INTERNAL_SERVER_ERROR;
}
&& (rv = apr_socket_opt_set(data_sock, APR_SO_RCVBUF,
conf->recv_buffer_size))) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: FTP: apr_socket_opt_set(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default");
+ "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,
- "apr_socket_opt_set(APR_TCP_NODELAY): Failed to set");
+ "apr_socket_opt_set(APR_TCP_NODELAY): "
+ "Failed to set");
}
/* make the connection */
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_error(APLOG_MARK, APLOG_ERR, rv, r->server,
- "proxy: FTP: PASV attempt to connect to %pI failed - Firewall/NAT?", pasv_addr);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "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));
}
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,
- "proxy: FTP: error creating local socket");
+ "error creating local socket");
proxy_ftp_cleanup(r, backend);
return HTTP_INTERNAL_SERVER_ERROR;
}
!= APR_SUCCESS) {
#ifndef _OSD_POSIX /* BS2000 has this option "always on" */
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: FTP: error setting reuseaddr option");
+ "error setting reuseaddr option");
proxy_ftp_cleanup(r, backend);
return HTTP_INTERNAL_SERVER_ERROR;
#endif /* _OSD_POSIX */
if ((rv = apr_socket_bind(local_sock, local_addr)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: FTP: error binding to ftp data socket %pI", local_addr);
+ "error binding to ftp data socket %pI", local_addr);
proxy_ftp_cleanup(r, backend);
return HTTP_INTERNAL_SERVER_ERROR;
}
/* only need a short queue */
if ((rv = apr_socket_listen(local_sock, 2)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: FTP: error listening to ftp data socket %pI", local_addr);
+ "error listening to ftp data socket %pI", local_addr);
proxy_ftp_cleanup(r, backend);
return HTTP_INTERNAL_SERVER_ERROR;
}
size = ftpmessage; /* already pstrdup'ed: no copy necessary */
}
else if (rc == 550) { /* Not a regular file */
- ap_log_error(APLOG_MARK, APLOG_TRACE4, 0, r->server,
- "proxy: FTP: SIZE shows this is a directory");
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
+ "SIZE shows this is a directory");
dirlisting = 1;
rc = proxy_ftp_command(apr_pstrcat(p, "CWD ",
ftp_escape_globbingchars(p, path, fdconf), CRLF, NULL),
"Error reading from remote server");
}
if (rc == 550) {
- ap_log_error(APLOG_MARK, APLOG_TRACE4, 0, r->server,
- "proxy: FTP: RETR failed, trying LIST instead");
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
+ "RETR failed, trying LIST instead");
/* Directory Listings should always be fetched in ASCII mode */
dirlisting = 1;
if (xfer_type != 'A' && size != NULL) {
/* We "trust" the ftp server to really serve (size) bytes... */
apr_table_setn(r->headers_out, "Content-Length", size);
- ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
- "proxy: FTP: Content-Length set to %s", size);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
+ "Content-Length set to %s", size);
}
}
if (r->content_type) {
apr_table_setn(r->headers_out, "Content-Type", r->content_type);
- ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
- "proxy: FTP: Content-Type set to %s", r->content_type);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
+ "Content-Type set to %s", r->content_type);
}
#if defined(USE_MDTM) && (defined(HAVE_TIMEGM) || defined(HAVE_GMTOFF))
char datestr[APR_RFC822_DATE_LEN];
apr_rfc822_date(datestr, mtime);
apr_table_set(r->headers_out, "Last-Modified", datestr);
- ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
- "proxy: FTP: Last-Modified set to %s", datestr);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
+ "Last-Modified set to %s", datestr);
}
#endif /* USE_MDTM */
/* set content-encoding (not for dir listings, they are uncompressed)*/
if (r->content_encoding != NULL && r->content_encoding[0] != '\0') {
- ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
- "proxy: FTP: Content-Encoding set to %s",
- r->content_encoding);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
+ "Content-Encoding set to %s", r->content_encoding);
apr_table_setn(r->headers_out, "Content-Encoding", r->content_encoding);
}
}
else {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: FTP: failed to accept data connection");
+ "failed to accept data connection");
proxy_ftp_cleanup(r, backend);
return HTTP_BAD_GATEWAY;
}
* the peer reset the connection already; ap_run_create_connection() closed
* the socket
*/
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: FTP: an error occurred creating the transfer connection");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "an error occurred creating the transfer connection");
proxy_ftp_cleanup(r, backend);
return HTTP_INTERNAL_SERVER_ERROR;
}
/* set up the connection filters */
rc = ap_run_pre_connection(data, data_sock);
if (rc != OK && rc != DONE) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: FTP: pre_connection setup failed (%d)",
- rc);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "pre_connection setup failed (%d)", rc);
data->aborted = 1;
proxy_ftp_cleanup(r, backend);
return rc;
apr_bucket *e;
int finish = FALSE;
- ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
- "proxy: FTP: start body send");
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r, "start body send");
/* read the body, pass it to the output filters */
while (ap_get_brigade(data->input_filters,
apr_socket_close(data_sock);
}
data_sock = NULL;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: FTP: data connection closed");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "data connection closed");
/* signal that we must leave */
finish = TRUE;
}
break;
}
}
- ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
- "proxy: FTP: end body send");
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r, "end body send");
}
if (data_sock) {
ap_flush_conn(data);
apr_socket_close(data_sock);
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: FTP: data connection closed");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "data connection closed");
}
/* Retrieve the final response for the RETR or LIST commands */
}
def_port = apr_uri_port_of_scheme(scheme);
- ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
- "proxy: HTTP: canonicalising URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
+ "HTTP: canonicalising URL %s", url);
/* do syntatic check.
* We break the URL into host, port, path, search
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",
- url, err);
+ "error parsing URL %s: %s", url, err);
return HTTP_BAD_REQUEST;
}
p_conn->worker->s->transferred += transferred;
status = ap_pass_brigade(origin->output_filters, bb);
if (status != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: pass request body failed to %pI (%s)",
- p_conn->addr, p_conn->hostname);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ "pass request body failed to %pI (%s)",
+ p_conn->addr, p_conn->hostname);
if (origin->aborted) {
const char *ssl_note;
if (status || *endstr || endstr == old_cl_val || cl_val < 0) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
- "proxy: could not parse request Content-Length (%s)",
+ "could not parse request Content-Length (%s)",
old_cl_val);
return HTTP_BAD_REQUEST;
}
*/
if (bytes_streamed > cl_val) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
- "proxy: read more bytes of request body than expected "
+ "read more bytes of request body than expected "
"(got %" APR_OFF_T_FMT ", expected %" APR_OFF_T_FMT ")",
bytes_streamed, cl_val);
return HTTP_INTERNAL_SERVER_ERROR;
}
if (bytes_streamed != cl_val) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: client %s given Content-Length did not match"
- " number of body bytes read", r->connection->remote_ip);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "client %s given Content-Length did not match"
+ " number of body bytes read", r->connection->remote_ip);
return HTTP_BAD_REQUEST;
}
* temporary file on disk.
*/
if (bytes_spooled + bytes > limit) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: Request body is larger than the"
- " configured limit of %" APR_OFF_T_FMT ".",
- limit);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "Request body is larger than the configured "
+ "limit of %" APR_OFF_T_FMT, limit);
return HTTP_REQUEST_ENTITY_TOO_LARGE;
}
/* can't spool any more in memory; write latest brigade to disk */
status = apr_temp_dir_get(&temp_dir, p);
if (status != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: search for temporary directory failed");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ "search for temporary directory failed");
return HTTP_INTERNAL_SERVER_ERROR;
}
apr_filepath_merge(&template, temp_dir,
APR_FILEPATH_NATIVE, p);
status = apr_file_mktemp(&tmpfile, template, 0, p);
if (status != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: creation of temporary file in directory %s failed",
- temp_dir);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ "creation of temporary file in directory "
+ "%s failed", temp_dir);
return HTTP_INTERNAL_SERVER_ERROR;
}
}
if (apr_file_name_get(&tmpfile_name, tmpfile) != APR_SUCCESS) {
tmpfile_name = "(unknown)";
}
- ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: write to temporary file %s failed",
- tmpfile_name);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ "write to temporary file %s failed",
+ tmpfile_name);
return HTTP_INTERNAL_SERVER_ERROR;
}
AP_DEBUG_ASSERT(bytes_read == bytes_written);
if (!hostname) {
hostname = r->server->server_hostname;
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
- "proxy: no HTTP 0.9 request (with no host line) "
+ "no HTTP 0.9 request (with no host line) "
"on incoming request and preserve host set "
"forcing hostname to be %s for uri %s",
- hostname,
- r->uri );
+ hostname, r->uri);
}
buf = apr_pstrcat(p, "Host: ", hostname, CRLF, NULL);
}
* do not modify add_te_chunked's logic
*/
if (old_te_val && strcasecmp(old_te_val, "chunked") != 0) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: %s Transfer-Encoding is not supported",
- old_te_val);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "%s Transfer-Encoding is not supported", old_te_val);
return HTTP_INTERNAL_SERVER_ERROR;
}
if (old_cl_val && old_te_val) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_ENOTIMPL, r->server,
- "proxy: client %s (%s) requested Transfer-Encoding "
- "chunked body with Content-Length (C-L ignored)",
- c->remote_ip, c->remote_host ? c->remote_host: "");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "client %s (%s) requested Transfer-Encoding "
+ "chunked body with Content-Length (C-L ignored)",
+ c->remote_ip, c->remote_host ? c->remote_host: "");
apr_table_unset(r->headers_in, "Content-Length");
old_cl_val = NULL;
origin->keepalive = AP_CONN_CLOSE;
AP_MODE_READBYTES, APR_BLOCK_READ,
MAX_MEM_SPOOL - bytes_read);
if (status != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: prefetch request body failed to %pI (%s)"
- " from %s (%s)",
- p_conn->addr, p_conn->hostname ? p_conn->hostname: "",
- c->remote_ip, c->remote_host ? c->remote_host: "");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ "prefetch request body failed to %pI (%s)"
+ " from %s (%s)",
+ p_conn->addr, p_conn->hostname ? p_conn->hostname: "",
+ c->remote_ip, c->remote_host ? c->remote_host: "");
return HTTP_BAD_REQUEST;
}
*/
status = ap_save_brigade(NULL, &input_brigade, &temp_brigade, p);
if (status != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: processing prefetched request body failed"
- " to %pI (%s) from %s (%s)",
- p_conn->addr, p_conn->hostname ? p_conn->hostname: "",
- c->remote_ip, c->remote_host ? c->remote_host: "");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
+ "processing prefetched request body failed"
+ " to %pI (%s) from %s (%s)",
+ p_conn->addr, p_conn->hostname ? p_conn->hostname: "",
+ c->remote_ip, c->remote_host ? c->remote_host: "");
return HTTP_INTERNAL_SERVER_ERROR;
}
if (rv != OK) {
/* apr_status_t value has been logged in lower level method */
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: pass request body failed to %pI (%s)"
- " from %s (%s)",
- p_conn->addr,
- p_conn->hostname ? p_conn->hostname: "",
- c->remote_ip,
- c->remote_host ? c->remote_host: "");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "pass request body failed to %pI (%s) from %s (%s)",
+ p_conn->addr, p_conn->hostname ? p_conn->hostname: "",
+ c->remote_ip, c->remote_host ? c->remote_host: "");
return rv;
}
* the first line of the response.
*/
if (saw_headers) {
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
- "proxy: Starting body due to bogus non-header in headers "
- "returned by %s (%s)", r->uri, r->method);
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ "Starting body due to bogus non-header "
+ "in headers returned by %s (%s)",
+ r->uri, r->method);
*pread_len = len;
return ;
} else {
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
- "proxy: No HTTP headers "
- "returned by %s (%s)", r->uri, r->method);
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ "No HTTP headers returned by %s (%s)",
+ r->uri, r->method);
return ;
}
}
}
/* this is the psc->badopt == bad_ignore case */
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
- "proxy: Ignoring bogus HTTP header "
- "returned by %s (%s)", r->uri, r->method);
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ "Ignoring bogus HTTP header returned by %s (%s)",
+ r->uri, r->method);
continue;
}
apr_status_t rc;
rc = apr_socket_timeout_set(backend->sock, worker->s->ping_timeout);
if (rc != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server,
- "proxy: could not set 100-Continue timeout");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
+ "could not set 100-Continue timeout");
}
}
}
}
if (len <= 0) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
- "proxy: error reading status line from remote "
+ "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,
- "proxy: read timeout");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "read timeout");
if (do_100_continue) {
return ap_proxyerror(r, HTTP_SERVICE_UNAVAILABLE, "Timeout on 100-Continue");
}
apr_bucket *eos;
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "proxy: Closing connection to client because"
+ "Closing connection to client because"
" reading from backend server %s:%d failed."
" Number of keepalives %i", backend->hostname,
backend->port, c->keepalives);
}
else if (!c->keepalives) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "proxy: NOT Closing connection to client"
+ "NOT Closing connection to client"
" although reading from backend server %s:%d"
- " failed.", backend->hostname,
- backend->port);
+ " failed.",
+ backend->hostname, backend->port);
}
return ap_proxyerror(r, HTTP_BAD_GATEWAY,
"Error reading from remote server");
&pread_len);
if (r->headers_out == NULL) {
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
- r->server, "proxy: bad HTTP/%d.%d header "
- "returned by %s (%s)", major, minor, r->uri,
- r->method);
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ "bad HTTP/%d.%d header returned by %s (%s)",
+ major, minor, r->uri, r->method);
backend->close += 1;
/*
* ap_send_error relies on a headers_out to be present. we
* XXX: We aught to treat such a response as uncachable
*/
apr_table_unset(r->headers_out, "Content-Length");
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: server %s:%d returned Transfer-Encoding"
- " and Content-Length", backend->hostname,
- backend->port);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "server %s:%d returned Transfer-Encoding"
+ " and Content-Length",
+ backend->hostname, backend->port);
backend->close += 1;
}
const char *policy = apr_table_get(r->subprocess_env,
"proxy-interim-response");
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
- "proxy: HTTP: received interim %d response",
- r->status);
+ "HTTP: received interim %d response", r->status);
if (!policy || !strcasecmp(policy, "RFC")) {
ap_send_interim_response(r, 1);
}
*/
else if (strcasecmp(policy, "Suppress")) {
ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
- "undefined proxy interim response policy");
+ "undefined proxy interim response policy");
}
}
/* Moved the fixups of Date headers and those affected by
if ((buf = apr_table_get(r->headers_out, wa))) {
apr_table_set(r->err_headers_out, wa, buf);
} else {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: origin server sent 401 without WWW-Authenticate header");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "origin server sent 401 without "
+ "WWW-Authenticate header");
}
}
apr_table_unset(r->headers_out,"Transfer-Encoding");
- ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
- "proxy: start body send");
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r, "start body send");
/*
* if we are overriding the errors, we can't put the content
* our backend bailed on us. Pass along a 502 error
* error bucket
*/
- ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c,
- "proxy: error reading response");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "error reading response");
ap_proxy_backend_broke(r, bb);
ap_pass_brigade(r->output_filters, bb);
backend_broke = 1;
backend->worker->s->read += readbytes;
#if DEBUGGING
{
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
- r->server, "proxy (PID %d): readbytes: %#x",
- getpid(), readbytes);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "readbytes: %#x", readbytes);
}
#endif
/* sanity check */
} while (!finish);
}
- ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
- "proxy: end body send");
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "end body send");
}
else if (!interim_response) {
- ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
- "proxy: header only");
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "header only");
/* make sure we release the backend connection as soon
* as we know we are done, so that the backend isn't
/* is it for us? */
if (strcmp(scheme, "https") == 0) {
if (!ap_proxy_ssl_enable(NULL)) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: HTTPS: declining URL %s"
- " (mod_ssl not configured?)", url);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "HTTPS: declining URL %s (mod_ssl not configured?)",
+ url);
return DECLINED;
}
is_ssl = 1;
proxy_function = "HTTPS";
}
else if (!(strcmp(scheme, "http") == 0 || (strcmp(scheme, "ftp") == 0 && proxyname))) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: HTTP: declining URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "HTTP: declining URL %s",
+ url);
return DECLINED; /* only interested in HTTP, or FTP via proxy */
}
else {
else
proxy_function = "FTP";
}
- ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
- "proxy: HTTP: serving URL %s", url);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "HTTP: serving URL %s", url);
/* create space for state information */
/* Step Two: Make the Connection */
if (ap_proxy_connect_backend(proxy_function, backend, worker, r->server)) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: HTTP: failed to make connection to backend: %s",
- backend->hostname);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "HTTP: failed to make connection to backend: %s",
+ backend->hostname);
status = HTTP_SERVICE_UNAVAILABLE;
break;
}
conf, uri, locurl, server_portstr)) != OK) {
if ((status == HTTP_SERVICE_UNAVAILABLE) && worker->s->ping_timeout_set) {
backend->close = 1;
- ap_log_error(APLOG_MARK, APLOG_INFO, status, r->server,
- "proxy: HTTP: 100-Continue failed to %pI (%s)",
- worker->cp->addr, worker->s->hostname);
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, status, r,
+ "HTTP: 100-Continue failed to %pI (%s)",
+ worker->cp->addr, worker->s->hostname);
retry++;
continue;
} else {
#define SCHEME "scgi"
-#define PROXY_FUNCTION "SCGI"
#define SCGI_MAGIC "SCGI"
#define SCGI_PROTOCOL_VERSION "1"
#define SCGI_DEFAULT_PORT (4000)
written = length;
if ((rv = apr_socket_send(conn->sock, buf, &written)) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: " PROXY_FUNCTION ": sending data to "
- "%s:%u failed", conn->hostname, conn->port);
+ "sending data to %s:%u failed",
+ conn->hostname, conn->port);
return HTTP_SERVICE_UNAVAILABLE;
}
}
if (readlen == -1) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
- "proxy: " PROXY_FUNCTION ": receiving request body "
- "failed");
+ "receiving request body failed");
return HTTP_INTERNAL_SERVER_ERROR;
}
}
APLOG_MODULE_INDEX);
if (status != OK) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
- "proxy: " PROXY_FUNCTION ": error reading response "
- "headers from %s:%u", conn->hostname, conn->port);
+ "error reading response headers from %s:%u",
+ conn->hostname, conn->port);
r->status_line = NULL;
apr_brigade_destroy(bb);
return status;
scgi_request_config *req_conf = apr_palloc(r->pool,
sizeof(*req_conf));
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "proxy: " PROXY_FUNCTION ": Found %s: %s - "
- "preparing subrequest.",
+ "Found %s: %s - preparing subrequest.",
conf->sendfile, location);
if (err) {
switch (req_conf->type) {
case scgi_internal_redirect:
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "proxy: " PROXY_FUNCTION ": Internal redirect to %s",
- req_conf->location);
+ "Internal redirect to %s", req_conf->location);
r->status_line = NULL;
if (r->method_number != M_GET) {
case scgi_sendfile:
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "proxy: " PROXY_FUNCTION ": File subrequest to %s",
- req_conf->location);
+ "File subrequest to %s", req_conf->location);
do {
request_rec *rr;
if (strncasecmp(url, SCHEME "://", sizeof(SCHEME) + 2)) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "proxy: " PROXY_FUNCTION ": declining URL %s", url);
+ "declining URL %s", url);
return DECLINED;
}
/* Create space for state information */
- status = ap_proxy_acquire_connection(PROXY_FUNCTION, &backend, worker,
+ status = ap_proxy_acquire_connection(__FUNCTION__, &backend, worker,
r->server);
if (status != OK) {
goto cleanup;
}
/* Step Two: Make the Connection */
- if (ap_proxy_connect_backend(PROXY_FUNCTION, backend, worker, r->server)) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
- "proxy: " PROXY_FUNCTION ": failed to make connection "
- "to backend: %s:%u", backend->hostname, backend->port);
+ if (ap_proxy_connect_backend(__FUNCTION__, backend, worker, r->server)) {
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "failed to make connection to backend: %s:%u",
+ backend->hostname, backend->port);
status = HTTP_SERVICE_UNAVAILABLE;
goto cleanup;
}
cleanup:
if (backend) {
backend->close = 1; /* always close the socket */
- ap_proxy_release_connection(PROXY_FUNCTION, backend, r->server);
+ ap_proxy_release_connection(__FUNCTION__, backend, r->server);
}
return status;
}
rp->notes = apr_table_make(pool, 5);
rp->server = r->server;
+ rp->log = r->log;
rp->proxyreq = r->proxyreq;
rp->request_time = r->request_time;
rp->connection = c;
apr_table_setn(r->notes, "verbose-error-to", apr_pstrdup(r->pool, "*"));
r->status_line = apr_psprintf(r->pool, "%3.3u Proxy Error", statuscode);
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
- "proxy: %s returned by %s", message, r->uri);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "%s returned by %s", message,
+ r->uri);
return statuscode;
}
struct noproxy_entry *npent = (struct noproxy_entry *) conf->noproxies->elts;
struct apr_sockaddr_t *conf_addr = npent[j].addr;
uri_addr = src_uri_addr;
- ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
- "proxy: checking remote machine [%s] against [%s]", uri_addr->hostname, npent[j].name);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
+ "checking remote machine [%s] against [%s]",
+ uri_addr->hostname, npent[j].name);
if ((npent[j].name && ap_strstr_c(uri_addr->hostname, npent[j].name))
|| npent[j].name[0] == '*') {
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
- "proxy: connect to remote machine %s blocked: name %s matched", uri_addr->hostname, npent[j].name);
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ "connect to remote machine %s blocked: name %s "
+ "matched", uri_addr->hostname, npent[j].name);
return HTTP_FORBIDDEN;
}
while (conf_addr) {
char *uri_ip;
apr_sockaddr_ip_get(&conf_ip, conf_addr);
apr_sockaddr_ip_get(&uri_ip, uri_addr);
- ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
- "proxy: ProxyBlock comparing %s and %s", conf_ip, uri_ip);
+ ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
+ "ProxyBlock comparing %s and %s", conf_ip,
+ uri_ip);
if (!apr_strnatcasecmp(conf_ip, uri_ip)) {
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
- "proxy: connect to remote machine %s blocked: IP %s matched", uri_addr->hostname, conf_ip);
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ "connect to remote machine %s blocked: "
+ "IP %s matched", uri_addr->hostname, conf_ip);
return HTTP_FORBIDDEN;
}
uri_addr = uri_addr->next;
/* Sanity check: Did we already return the pooled connection? */
if (conn->inreslist) {
ap_log_perror(APLOG_MARK, APLOG_ERR, 0, conn->pool,
- "proxy: Pooled connection 0x%pp for worker %s has been"
+ "Pooled connection 0x%pp for worker %s has been"
" already returned to the connection pool.", conn,
worker->s->name);
return APR_SUCCESS;
rv = apr_brigade_length(bb, 0, &len);
ap_log_rerror(APLOG_MARK, APLOG_TRACE3, rv, r,
- "proxy: SSL cleanup brigade contained %"
+ "SSL cleanup brigade contained %"
APR_OFF_T_FMT " bytes of data.", len);
}
apr_brigade_destroy(bb);
if (worker->tmutex == NULL) {
rv = apr_thread_mutex_create(&(worker->tmutex), APR_THREAD_MUTEX_DEFAULT, p);
if (rv != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
"can not create worker thread mutex");
return rv;
}
if (worker->cp == NULL)
init_conn_pool(p, worker);
if (worker->cp == NULL) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "can not create connection pool");
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
+ "can not create connection pool");
return APR_EGENERAL;
}
apr_pool_cleanup_null);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "proxy: initialized pool in child %" APR_PID_T_FMT " for (%s) min=%d max=%d smax=%d",
+ "initialized pool in child %" APR_PID_T_FMT " for (%s) min=%d max=%d smax=%d",
getpid(), worker->s->hostname, worker->s->min,
worker->s->hmax, worker->s->smax);
worker->cp->conn = conn;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "proxy: initialized single connection worker in child %" APR_PID_T_FMT " for (%s)",
+ "initialized single connection worker in child %" APR_PID_T_FMT " for (%s)",
getpid(), worker->s->hostname);
}
}
++worker->s->retries;
worker->s->status &= ~PROXY_WORKER_IN_ERROR;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "proxy: %s: worker for (%s) has been marked for retry",
+ "%s: worker for (%s) has been marked for retry",
proxy_function, worker->s->hostname);
return OK;
}
else {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "proxy: %s: too soon to retry worker for (%s)",
+ "%s: too soon to retry worker for (%s)",
proxy_function, worker->s->hostname);
return DECLINED;
}
*worker = ap_proxy_get_worker(r->pool, NULL, conf, *url);
if (*worker) {
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
- "proxy: %s: found worker %s for %s",
+ "%s: found worker %s for %s",
(*worker)->s->scheme, (*worker)->s->name, *url);
*balancer = NULL;
else if (r->proxyreq == PROXYREQ_PROXY) {
if (conf->forward) {
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
- "proxy: *: found forward proxy worker for %s",
- *url);
+ "*: found forward proxy worker for %s", *url);
*balancer = NULL;
*worker = conf->forward;
access_status = OK;
else if (r->proxyreq == PROXYREQ_REVERSE) {
if (conf->reverse) {
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
- "proxy: *: found reverse proxy worker for %s",
- *url);
+ "*: found reverse proxy worker for %s", *url);
*balancer = NULL;
*worker = conf->reverse;
access_status = OK;
else if (access_status == DECLINED && *balancer != NULL) {
/* All the workers are busy */
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
- "proxy: all workers are busy. Unable to serve %s",
- *url);
+ "all workers are busy. Unable to serve %s", *url);
access_status = HTTP_SERVICE_UNAVAILABLE;
}
return access_status;
SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
ap_log_rerror(APLOG_MARK, loglevel, rv, r,
- "proxy: %s: error creating fam %d socket for target %s",
- proxy_function,
- backend_addr->family,
- backend_name);
+ "%s: error creating fam %d socket for target %s",
+ proxy_function, backend_addr->family, backend_name);
/*
* this could be an IPv6 address from the DNS but the
* local machine won't give us an IPv6 socket; hopefully the
}
ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
- "proxy: %s: fam %d socket created to connect to %s",
+ "%s: fam %d socket created to connect to %s",
proxy_function, backend_addr->family, backend_name);
if (conf->source_address) {
rv = apr_socket_bind(*newsock, conf->source_address);
if (rv != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: %s: failed to bind socket to local address",
+ "%s: failed to bind socket to local address",
proxy_function);
}
}
apr_socket_close(*newsock);
loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
ap_log_rerror(APLOG_MARK, loglevel, rv, r,
- "proxy: %s: attempt to connect to %pI (%s) failed",
- proxy_function,
- backend_addr,
- backend_name);
+ "%s: attempt to connect to %pI (%s) failed",
+ proxy_function, backend_addr, backend_name);
backend_addr = backend_addr->next;
continue;
}
if (!PROXY_WORKER_IS_USABLE(worker)) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
- "proxy: %s: disabled connection for (%s)",
+ "%s: disabled connection for (%s)",
proxy_function, worker->s->hostname);
return HTTP_SERVICE_UNAVAILABLE;
}
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
- "proxy: %s: failed to acquire connection for (%s)",
+ "%s: failed to acquire connection for (%s)",
proxy_function, worker->s->hostname);
return HTTP_SERVICE_UNAVAILABLE;
}
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "proxy: %s: has acquired connection for (%s)",
+ "%s: has acquired connection for (%s)",
proxy_function, worker->s->hostname);
(*conn)->worker = worker;
server_rec *s)
{
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "proxy: %s: has released connection for (%s)",
+ "%s: has released connection for (%s)",
proxy_function, conn->worker->s->hostname);
connection_cleanup(conn);
uri->port = apr_uri_port_of_scheme(uri->scheme);
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: connecting %s to %s:%d", *url, uri->hostname,
- uri->port);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "connecting %s to %s:%d", *url, uri->hostname, uri->port);
/*
* allocate these out of the specified connection pool
}
else if (!worker->cp->addr) {
if ((err = PROXY_THREAD_LOCK(worker)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server,
- "proxy: lock");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, err, r, "lock");
return HTTP_INTERNAL_SERVER_ERROR;
}
worker->cp->pool);
conn->addr = worker->cp->addr;
if ((uerr = PROXY_THREAD_UNLOCK(worker)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, uerr, r->server,
- "proxy: unlock");
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, uerr, r, "unlock");
}
}
else {
return ap_proxyerror(r, HTTP_FORBIDDEN,
"Connect to remote machine blocked");
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: connected %s to %s:%d", *url, conn->hostname,
- conn->port);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ "connected %s to %s:%d", *url, conn->hostname, conn->port);
return OK;
}
int len = 0;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "proxy: CONNECT: sending the CONNECT request for %s:%d "
+ "CONNECT: sending the CONNECT request for %s:%d "
"to the remote proxy %pI (%s)",
forward->target_host, forward->target_port,
backend->addr, backend->hostname);
if (!(connected = is_socket_connected(conn->sock))) {
socket_cleanup(conn);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "proxy: %s: backend socket is disconnected.",
+ "%s: backend socket is disconnected.",
proxy_function);
}
}
conn->scpool)) != APR_SUCCESS) {
loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
ap_log_error(APLOG_MARK, loglevel, rv, s,
- "proxy: %s: error creating fam %d socket for target %s",
+ "%s: error creating fam %d socket for target %s",
proxy_function,
backend_addr->family,
worker->s->hostname);
}
}
ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, s,
- "proxy: %s: fam %d socket created to connect to %s",
+ "%s: fam %d socket created to connect to %s",
proxy_function, backend_addr->family, worker->s->hostname);
if (conf->source_address_set) {
rv = apr_socket_bind(newsock, local_addr);
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
- "proxy: %s: failed to bind socket to local address",
+ "%s: failed to bind socket to local address",
proxy_function);
}
}
apr_socket_close(newsock);
loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
ap_log_error(APLOG_MARK, loglevel, rv, s,
- "proxy: %s: attempt to connect to %pI (%s) failed",
+ "%s: attempt to connect to %pI (%s) failed",
proxy_function,
backend_addr,
worker->s->hostname);
apr_socket_close(newsock);
loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
ap_log_error(APLOG_MARK, loglevel, rv, s,
- "proxy: %s: attempt to connect to %s:%d "
+ "%s: attempt to connect to %s:%d "
"via http CONNECT through %pI (%s) failed",
proxy_function,
forward->target_host, forward->target_port,
* closed the socket
*/
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
- s, "proxy: %s: an error occurred creating a "
+ s, "%s: an error occurred creating a "
"new connection to %pI (%s)", proxy_function,
backend_addr, conn->hostname);
/* XXX: Will be closed when proxy_conn is closed */
if (conn->is_ssl) {
if (!ap_proxy_ssl_enable(conn->connection)) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0,
- s, "proxy: %s: failed to enable ssl support "
+ s, "%s: failed to enable ssl support "
"for %pI (%s)", proxy_function,
backend_addr, conn->hostname);
return HTTP_INTERNAL_SERVER_ERROR;
}
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "proxy: %s: connection complete to %pI (%s)",
+ "%s: connection complete to %pI (%s)",
proxy_function, backend_addr, conn->hostname);
/*
if (rc != OK && rc != DONE) {
conn->connection->aborted = 1;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "proxy: %s: pre_connection setup failed (%d)",
+ "%s: pre_connection setup failed (%d)",
proxy_function, rc);
return rc;
}
}
else {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
- "proxy: Unhandled bucket type of type %s in"
+ "Unhandled bucket type of type %s in"
" ap_proxy_buckets_lifetime_transform", e->type->name);
apr_bucket_delete(e);
rv = APR_EGENERAL;