From 505476216e84e61f3b2a03a2939774f7b0ccebc7 Mon Sep 17 00:00:00 2001 From: Len Kranendonk Date: Wed, 9 Apr 2003 11:33:52 +0000 Subject: [PATCH] Fixed Bug: 716700 -> Better sollution --- lib/WebGUI/Wobject/HttpProxy/Parse.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/WebGUI/Wobject/HttpProxy/Parse.pm b/lib/WebGUI/Wobject/HttpProxy/Parse.pm index 61d2851d0..c73cca2a4 100644 --- a/lib/WebGUI/Wobject/HttpProxy/Parse.pm +++ b/lib/WebGUI/Wobject/HttpProxy/Parse.pm @@ -63,7 +63,7 @@ sub filter { my $self=shift; $self->parse($self->{Content}); # Make paths absolute and let them return to us $self->eof; - return "

Error: Can't proxy a HttpProxy object inside a HttpProxy object.

" if ($self->{recurseCheck}); + return "

Error: HttpProxy can't recursively proxy its own content.

" if ($self->{recurseCheck}); return $self->{Filtered}; } @@ -97,11 +97,14 @@ sub end { sub start { my $self = shift; my ($tag, $attr, $attrseq, $origtext) = @_; + # Check on the div class and div id attributes to see if we're proxying ourself. + if($tag eq "div" && $attr->{'class'} eq 'wobjectHttpProxy' && $attr->{'id'} eq ('wobjectId'.$self->{wid})) { + $self->{recurseCheck} = 1; + } $self->output("<$tag"); for (keys %$attr) { $self->output(" $_=\""); my $val = $attr->{$_}; - $self->{recurseCheck} = 1 if($val =~ /proxiedUrl=/i); # We're proxying ourself. if ((lc($tag) eq "input" || lc($tag) eq "textarea" || lc($tag) eq "select") && (lc($_) eq "name" || lc($_) eq "submit")) { # Rewrite input type names $val = 'HttpProxy_' . $val;