<commit_before>#!/usr/bin/env python

from circuits import Component
from circuits.web import Server, Controller

class Upper(Component):

    channel = "http"

    def response(self, response):
        response.body = response.body.upper()

class Root(Controller):

    def index(self):
        return "Hello World!"

(Server(8000) + Upper() + Root()).run()
<commit_msg>examples/web/filtering.py: Fixed example<commit_after>#!/usr/bin/env python

from circuits import handler, Component
from circuits.web import Server, Controller

class Upper(Component):

    channel = "web"

    @handler("response", priority=1.0)
    def _on_response(self, response):
        response.body = "".join(response.body).upper()

class Root(Controller):

    def index(self):
        return "Hello World!"

(Server(8000) + Upper() + Root()).run()

{'fraction_non_alphanumeric': 0.13751507840772015, 'fraction_numerical': 0.012062726176115802, 'mean_word_length': 3.911242603550296, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3917539', 'n_tokens_mistral': 259, 'n_tokens_neox': 238, 'n_words': 65}