From 7a1136dd893bb6c903fa46089a1292e0f96779bc Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 16 Sep 2008 15:26:49 +0000 Subject: [PATCH] rfe: Process Macros in HTTP Proxy's URL --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset/Wobject/HttpProxy.pm | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 07ce18ce1..554354735 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,5 +1,6 @@ 7.6.0 - rfe: Town Hall: Menu title in search results + - rfe: Process Macros in HTTP Proxy's URL - rewrite macro parser, improving speed and making parameter parsing more sane - Made the charset metatag the highest thing in the head block. - fixed: AssetProxy allows proxying content in the trash or clipboard diff --git a/lib/WebGUI/Asset/Wobject/HttpProxy.pm b/lib/WebGUI/Asset/Wobject/HttpProxy.pm index e444412c1..df1287f07 100644 --- a/lib/WebGUI/Asset/Wobject/HttpProxy.pm +++ b/lib/WebGUI/Asset/Wobject/HttpProxy.pm @@ -21,6 +21,7 @@ use WebGUI::Storage; use WebGUI::Asset::Wobject; use WebGUI::Asset::Wobject::HttpProxy::Parse; use WebGUI::Cache; +use WebGUI::Macro; use Apache2::Upload; our @ISA = qw(WebGUI::Asset::Wobject); @@ -238,8 +239,9 @@ sub view { my $redirect = 0; my $response; my $header; - my $proxiedUrl; - + my $proxiedUrl = $self->get("proxiedUrl"); + WebGUI::Macro::process($self->session,\$proxiedUrl); + my $i18n = WebGUI::International->new($self->session, 'Asset_HttpProxy'); ### Set up a cookie jar @@ -251,9 +253,7 @@ sub view { ### Find the URL we're proxying if ($self->session->form->param("func")!~/editSave/i) { # Ignore ?func=editSave - $proxiedUrl = $self->session->form->process("FormAction") || $self->session->form->process("proxiedUrl") || $self->get("proxiedUrl") ; - } else { - $proxiedUrl = $self->get("proxiedUrl"); + $proxiedUrl = $self->session->form->process("FormAction") || $self->session->form->process("proxiedUrl") || $proxiedUrl ; } return $self->processTemplate({},$self->get("templateId")) @@ -270,7 +270,6 @@ sub view { $var{content} = $cacheContent->get; } - # Unless we have cached content unless ($var{content}) {