<commit_before>import json

from tornado import httputil
from tornado.httputil import RequestStartLine
from ..handler import RequestHandler
import tornado.httputil

from http_request import HttpRequest
tornado.httputil.HTTPServerRequest = HttpRequest


class TornadoRequestHandler(RequestHandler):
    def __init__(self, app):
        self.request_callback = app

    def start_serving(self, request_conn):
        return _ServerRequestAdapter(self, request_conn)

    def handle_request(self, context, conn):
        """dispatch incoming request to particular endpoint

        :param context: context contains received CallRequestMessage
        :param conn: An incoming TornadoConnection
        """
        request_delegate = self.start_serving(conn)
        message = context.message
        # process http message
        """TODO need a better way to figure out
        message's method type
        """
        if message.headers["as"] == "http":
            method = "GET"
            if (hasattr(message, "arg_3") and
                    message.arg_3 is not None and<commit_msg>remove unnecessary code<commit_after>import json

from tornado import httputil
from tornado.httputil import RequestStartLine
from ..handler import RequestHandler
import tornado.httputil

from http_request import HttpRequest
tornado.httputil.HTTPServerRequest = HttpRequest


class TornadoRequestHandler(RequestHandler):
    def __init__(self, app):
        self.request_callback = app

    def start_serving(self, request_conn):
        return _ServerRequestAdapter(self, request_conn)

    def handle_request(self, context, conn):
        """dispatch incoming request to particular endpoint

        :param context: context contains received CallRequestMessage
        :param conn: An incoming TornadoConnection
        """
        request_delegate = self.start_serving(conn)
        message = context.message
        # process http message
        """TODO need a better way to figure out
        message's method type
        """
        if message.headers["as"] == "http":
            method = "GET"
            if (message.arg_3 is not None and
{'fraction_non_alphanumeric': 0.06788389513108614, 'fraction_numerical': 0.0014044943820224719, 'mean_word_length': 3.047348484848485, 'pattern_counts': {'":': 2, '<': 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': '3501001', 'n_tokens_mistral': 547, 'n_tokens_neox': 527, 'n_words': 174}