mod_proxy_fdpass.c revision 983528026996668ea295be95aedb9c7a346af470
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "mod_proxy.h"
#ifndef CMSG_DATA
#endif
#include "mod_proxy_fdpass.h"
{
const char *path;
url += 5;
}
else {
return DECLINED;
}
"set r->filename to %s", r->filename);
return OK;
}
const char* path,
{
apr_socket_t *s;
if (rv != APR_SUCCESS) {
return rv;
}
if (rv != APR_SUCCESS) {
return rv;
}
*out_sock = s;
return APR_SUCCESS;
}
apr_socket_t *s,
{
char b = '\0';
if (rv != APR_SUCCESS) {
return rv;
}
if (rv != APR_SUCCESS) {
return rv;
}
if (rv == -1) {
return errno;
}
return APR_SUCCESS;
}
{
url += 5;
}
else {
return DECLINED;
}
if (rv != APR_SUCCESS) {
"Failed to connect to '%s'", url);
return HTTP_INTERNAL_SERVER_ERROR;
}
{
int status;
flush_method, "0");
if (!flush) {
"Unable to find configured flush provider '%s'",
return HTTP_INTERNAL_SERVER_ERROR;
}
if (status) {
return status;
}
}
if (rv != APR_SUCCESS) {
return HTTP_INTERNAL_SERVER_ERROR;
}
{
/* Create a dummy unconnected socket, and set it as the one we were
* connected to, so that when the core closes it, it doesn't close
* the tcp connection to the client.
*/
r->connection->pool);
if (rv != APR_SUCCESS) {
"failed to create dummy socket");
return HTTP_INTERNAL_SERVER_ERROR;
}
}
return OK;
}
static int standard_flush(request_rec *r)
{
int status;
apr_bucket *e;
"ap_pass_brigade failed:");
return status;
}
return OK;
}
static const proxy_fdpass_flush builtin_flush =
{
"flush",
};
static void register_hooks(apr_pool_t *p)
{
}
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */
NULL, /* create per-server config structure */
NULL, /* merge per-server config structures */
NULL, /* command apr_table_t */
register_hooks /* register hooks */
};