Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 46F8A41D3 for ; Thu, 7 Jul 2011 21:18:54 +0000 (UTC) Received: (qmail 83376 invoked by uid 500); 7 Jul 2011 21:18:53 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 83329 invoked by uid 500); 7 Jul 2011 21:18:53 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 83321 invoked by uid 99); 7 Jul 2011 21:18:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jul 2011 21:18:52 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of info@bnoordhuis.nl designates 74.125.83.45 as permitted sender) Received: from [74.125.83.45] (HELO mail-gw0-f45.google.com) (74.125.83.45) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jul 2011 21:18:43 +0000 Received: by gwb19 with SMTP id 19so770358gwb.18 for ; Thu, 07 Jul 2011 14:18:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.154.161 with SMTP id h21mr1661226yhk.396.1310073502885; Thu, 07 Jul 2011 14:18:22 -0700 (PDT) Received: by 10.236.203.196 with HTTP; Thu, 7 Jul 2011 14:18:22 -0700 (PDT) X-Originating-IP: [87.214.96.125] In-Reply-To: References: Date: Thu, 7 Jul 2011 23:18:22 +0200 Message-ID: Subject: Re: proxying another protocol to http/https From: Ben Noordhuis To: modules-dev@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Jul 7, 2011 at 02:56, Jodi Bosa wrote: > I would like to leverage mod_proxy and mod_proxy_http to proxy client > requests (from another protocol). > Assuming I have input & output filters that handle the other protocol wit= h > the client, shouldn't I simply be able to: > > > Handler > { > =A0 =A0r->filename =3D apr_psprintf(r->pool, "proxy:https://%s", hostname= ); > =A0 =A0r->proxyreq =3D PROXYREQ_PROXY; > =A0 =A0return DECLINED; /* to allow mod_proxy to kick in and do it's thin= g */ > } That should work if your handler runs before mod_proxy. Hook it at APR_HOOK_REALLY_FIRST.