mod_proxy_fdpass.c revision df87aca8c6fb25d30168f36a347ff171aaa46bda
842ae4bd224140319ae7feec1872b93dfd491143fielding/* Licensed to the Apache Software Foundation (ASF) under one or more
842ae4bd224140319ae7feec1872b93dfd491143fielding * contributor license agreements. See the NOTICE file distributed with
842ae4bd224140319ae7feec1872b93dfd491143fielding * this work for additional information regarding copyright ownership.
842ae4bd224140319ae7feec1872b93dfd491143fielding * The ASF licenses this file to You under the Apache License, Version 2.0
842ae4bd224140319ae7feec1872b93dfd491143fielding * (the "License"); you may not use this file except in compliance with
842ae4bd224140319ae7feec1872b93dfd491143fielding * the License. You may obtain a copy of the License at
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * Unless required by applicable law or agreed to in writing, software
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * distributed under the License is distributed on an "AS IS" BASIS,
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * See the License for the specific language governing permissions and
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * limitations under the License.
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh#error This module only works on unix platforms with the correct OS support
2d2eda71267231c2526be701fe655db125852c1ffielding/* for apr_wait_for_io_or_timeout */
d2227b43aaee9a78350dc107bdc404859ad1f938rbb const char *path;
d2227b43aaee9a78350dc107bdc404859ad1f938rbb r->filename = apr_pstrcat(r->pool, "proxy:fd://", path, NULL);
2d2eda71267231c2526be701fe655db125852c1ffielding/* TODO: In APR 2.x: Extend apr_sockaddr_t to possibly be a path !!! */
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianhstatic apr_status_t socket_connect_un(apr_socket_t *sock,
20f1b1a67eef5ab0f3295608c89964a7dca4fdd1pquerna rv = connect(rawsock, (struct sockaddr*)sa, sizeof(*sa) + strlen(sa->sun_path));
20f1b1a67eef5ab0f3295608c89964a7dca4fdd1pquerna if ((rv == -1) && (errno == EINPROGRESS || errno == EALREADY)
20f1b1a67eef5ab0f3295608c89964a7dca4fdd1pquerna && (t > 0)) {
d2227b43aaee9a78350dc107bdc404859ad1f938rbb const char* path,
45acd673a68181802b112e97e84fa3813ddd3ec1stoddard rv = apr_socket_create(&s, AF_UNIX, SOCK_STREAM, 0, p);
apr_socket_t *s,
if (rv) {
return rv;
if (rv) {
return rv;
return errno;
return APR_SUCCESS;
return DECLINED;
if (rv) {
url);
return HTTP_INTERNAL_SERVER_ERROR;
int status;
if (!flush) {
return HTTP_INTERNAL_SERVER_ERROR;
if (status) {
return status;
if (rv) {
return HTTP_INTERNAL_SERVER_ERROR;
if (rv) {
return HTTP_INTERNAL_SERVER_ERROR;
return OK;
int status;
apr_bucket *e;
return status;
return OK;