You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ian Holsman <li...@holsman.net> on 2007/11/01 07:15:49 UTC

Re: Proxying subrequests

Nick Kew wrote:
> Our subrequest API currently handles only local subrequests,
> so for example mod_include doesn't support
> <!--#include virtual="http://example.com/example.txt"-->.
> I've worked around this in the past with some ugly hacks.
>
> Looking at the code, it's actually very simple to build
> in support for remote URLs into the subrequest mechanism
> using mod_proxy.  I've just test-driven a patch comprising
> just six lines of code (attached), and it works.
>
> The patch still needs attention to escaping, but before
> I deal with that, can I ask for votes on the concept?
> Is there any reason not to add this feature?
>
>   
+1
I've wanted this feature in mod-include for years, and have been too 
lazy to do it.
 (relying on custom module hacks to implement it)

as for PHP security holes.. maybe a config option or something to 
enable/disable it.


Re: Proxying subrequests

Posted by "Akins, Brian" <Br...@turner.com>.
On 11/1/07 6:48 PM, "Ian Holsman" <li...@holsman.net> wrote:

> Akins, Brian wrote:
>> -1 from me (if that counts.)
>> 
>> Using ProxyPass should be fine for 95% of the use cases??
>> 
>> ProxyPass /cnn http://www.cnn.com/
>> 
>> <!--#include virtual="/cnn/WORLD/index.html" -->
>>  
> 
> yes.
> if you:
> a. have a static small number of hosts
> b. those hosts don't change often
> 
> if either of these 2 conditions aren't met, then proxypass is next to
> useless.

True. (You could manage with a decent config tool, however.)

Couldn't some creative rewrite rules do the same thing:

RewriteCond %{IS_SUBREQ} true
RewriteRule ^/proxy/(.*) http://$1 [P,L]

Note: not sure if that will actually work.

I just foresee horrible cross-site type "vulnerabilities" in this.
 
If it is configurable on/off, then I'm -0.


-- 
Brian Akins
Chief Operations Engineer
Turner Digital Media Technologies


Re: Proxying subrequests

Posted by Ian Holsman <li...@holsman.net>.
Akins, Brian wrote:
> -1 from me (if that counts.)
>
> Using ProxyPass should be fine for 95% of the use cases??
>
> ProxyPass /cnn http://www.cnn.com/
>
> <!--#include virtual="/cnn/WORLD/index.html" -->
>   

yes.
if you:
a. have a static small number of hosts
b. those hosts don't change often

if either of these 2 conditions aren't met, then proxypass is next to 
useless.

Re: Proxying subrequests

Posted by "Akins, Brian" <Br...@turner.com>.
-1 from me (if that counts.)

Using ProxyPass should be fine for 95% of the use cases??

ProxyPass /cnn http://www.cnn.com/

<!--#include virtual="/cnn/WORLD/index.html" -->



-- 
Brian Akins
Chief Operations Engineer
Turner Digital Media Technologies