X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=mod-proxy-fdpass.git;a=blobdiff_plain;f=mod_proxy_fdpass.c;fp=mod_proxy_fdpass.c;h=9dbd0a91577d115c608ad779ce0b811f540ac9af;hp=34ee2fe99c5271b184882dda0608abb84d9b386d;hb=9683a35573f31f4ba36a7c6579768a8ca91bc913;hpb=004b0120757aeba396f5d2a4e6e7d01c3a8ec47e diff --git a/mod_proxy_fdpass.c b/mod_proxy_fdpass.c index 34ee2fe..9dbd0a9 100644 --- a/mod_proxy_fdpass.c +++ b/mod_proxy_fdpass.c @@ -346,6 +346,22 @@ static int proxy_fdpass_handler(request_rec *r, proxy_worker *worker, ap_filter_t *f; ap_filter_rec_t *fg; + if (strncasecmp(url, "fd://", 5) == 0) { + url += 5; + } + else { + return DECLINED; + } + + rv = get_socket_from_path(r, r->pool, url, &sock); + + if (rv != APR_SUCCESS) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, + "proxy: FD: Failed to connect to '%s' %d xxx", + url, rv); + return HTTP_INTERNAL_SERVER_ERROR; + } + fg = ap_get_output_filter_handle("HTTP_HEADER"); @@ -381,22 +397,6 @@ static int proxy_fdpass_handler(request_rec *r, proxy_worker *worker, close(mop_fd); } - if (strncasecmp(url, "fd://", 5) == 0) { - url += 5; - } - else { - return DECLINED; - } - - rv = get_socket_from_path(r, r->pool, url, &sock); - - if (rv != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, - "proxy: FD: Failed to connect to '%s' %d xxx", - url, rv); - return HTTP_INTERNAL_SERVER_ERROR; - } - /* create a couple of sockets and pass one to the client for headers and so on */ if (socketpair(AF_UNIX, SOCK_STREAM, 0, ctrlrawsock)) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,