PROXY  WHOIS  RQUOTE  TEXTS  SOFT  FOREX  BBOARD
 Music  Philosophy  Code  Literature  Russian

= ROOT|Technical|Code_Examples|Perl|Proxy|HoTTProxy|HoTTProxy_Add-In_Filters.pl =

page 1 of 1




# If you don't *really* know what you are doing - don't mess with this file
# You've been warned!!!

sub AddInFilters {
	my $proxy = shift;

# -------------------------------------------------------------------------------------------------------------------------
	
	# Fixes blank title attributes which screw up some phones
	my $fixBlankTitleAttribute_RBF = HTTP::Proxy::BodyFilter::simple->new(
		sub { 
			my ( $self, $dataref, $message, $protocol, $buffer ) = @_;
			if (my $replCount = $$dataref =~ s/title=""/title="-Go-"/g) {
				say ("\nfixBlankTitleAttribute RBF replaced blank title with -Go- title $replCount times.\n\n",6);
			}		
		}
	);
	
	$proxy->push_filter( mime => 'text/*', response => $fixBlankTitleAttribute_RBF );
	$proxy->push_filter( mime => 'application/*', response => $fixBlankTitleAttribute_RBF );
}

# -------------------------------------------------------------------------------------------------------------------------
	
# Make 'require' happy
1;
=1=
THE END

<<< SINGLE PAGE >>>

UP TO ROOT | UP TO DIR

Google
 

E-mail Facebook Google Digg del.icio.us BlinkList Fark Furl Ma.gnolia Netscape NewsVine Reddit Slashdot Spurl StumbleUpon Technorati YahooMyWeb LiveJournal Blogmarks TwitThis Live News2.ru BobrDobr.ru Memori.ru MoeMesto.ru

0.0267301 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)