From f2b640f48087755005e9746e6125bc4995170945 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sun, 5 Jul 2009 00:38:07 +0000 Subject: [PATCH] Add missing POD to the HttpProxy --- lib/WebGUI/Asset/Wobject/HttpProxy.pm | 44 ++++++++++++++++++ lib/WebGUI/Asset/Wobject/HttpProxy/Parse.pm | 51 +++++++++++++++++++++ 2 files changed, 95 insertions(+) diff --git a/lib/WebGUI/Asset/Wobject/HttpProxy.pm b/lib/WebGUI/Asset/Wobject/HttpProxy.pm index 10ce01e42..bb0d06273 100644 --- a/lib/WebGUI/Asset/Wobject/HttpProxy.pm +++ b/lib/WebGUI/Asset/Wobject/HttpProxy.pm @@ -27,6 +27,23 @@ use Apache2::Upload; our @ISA = qw(WebGUI::Asset::Wobject); #------------------------------------------------------------------- + +=head2 appendToUrl ($url, $paramSet) + +Append some parameters to a URL, similar to $session->url->append. This method +also will either append with an ampersand or a semi-colon, based on the useAmersand +asset property. + +=head3 $url + +The URL to use as a base. + +=head3 $paramSet + +A string of parameters to add to the URL. + +=cut + sub appendToUrl { my $self = shift; my $url = shift; @@ -179,12 +196,26 @@ sub definition { } #------------------------------------------------------------------- + +=head2 getContentLastModified + +Override the base method to say that the asset content is never cached. + +=cut + sub getContentLastModified { return time; } #------------------------------------------------------------------- + +=head2 getCookieJar + +Return a WebGUI::Storage object to hold cookie data. + +=cut + sub getCookieJar { my $self = shift; my $storage; @@ -252,6 +283,13 @@ sub purgeCache { } #------------------------------------------------------------------- + +=head2 view + +Main screen for the HttpProxy. + +=cut + sub view { my $self = shift; my %var; @@ -450,6 +488,12 @@ sub view { #------------------------------------------------------------------- +=head2 www_view + +Override the base method to handle non-HTML mime types. + +=cut + sub www_view { my $self = shift; return $self->session->privilege->noAccess() unless $self->canView; diff --git a/lib/WebGUI/Asset/Wobject/HttpProxy/Parse.pm b/lib/WebGUI/Asset/Wobject/HttpProxy/Parse.pm index 4106e36b5..57936705a 100644 --- a/lib/WebGUI/Asset/Wobject/HttpProxy/Parse.pm +++ b/lib/WebGUI/Asset/Wobject/HttpProxy/Parse.pm @@ -83,6 +83,11 @@ sub new { $self; } + +=head2 filter + +=cut + sub filter { my $self=shift; $self->parse($self->{Content}); # Make paths absolute and let them return to us @@ -96,33 +101,79 @@ sub filter { + +=head2 output ( $text ) + +Appends $text to the filtered output. + +=cut + sub output { $_[0]->{Filtered} .= $_[1]; } +=head2 declaration ($text) + +Adds $text as an HTML declaration + +=cut sub declaration { $_[0]->output("") } + +=head2 comment ($text) + +Adds $text as an HTML comment + +=cut + sub comment { $_[0]->output("") } + +=head2 text ($text) + +Adds $text as direct text + +=cut + sub text { $_[0]->output($_[1]) } +=head2 end ($text) + +Adds $text as a closing HTML tag. + +=cut sub end { $_[0]->output("") } + +=head2 session + +Returns a copy of the session variable. + +=cut + sub session { return $_[0]->{_session}; } + +=head2 start + +Override the method from the master class to handle recursing through the content and +rewriting URLs. + +=cut + sub start { my $self = shift; my ($tag, $attr, $attrseq, $origtext) = @_;