<commit_before>package com.twitter.finagle.http

import java.nio.charset.Charset

import org.specs.Specification
import org.specs.mock.Mockito

import org.jboss.netty.channel._
import org.jboss.netty.handler.codec.http._
import org.jboss.netty.buffer.ChannelBuffers

object HttpServerConnectionLifecycleManagerSpec extends Specification with Mockito {
  // > further tests
  //   - malformed requests/responses
  //   - methods other than GET
  //   - 100/continue

  "the HTTP connection lifecycle handler" should {
    val handler = new HttpServerConnectionLifecycleManager
    val me = mock[MessageEvent]
    val c = mock[Channel]
    val ctx = mock[ChannelHandlerContext]
    val cFuture = new DefaultChannelFuture(c, false)
    me.getChannel returns c

    new DefaultHttpResponse(HttpVersion.HTTP_1_0, HttpResponseStatus.OK)

    def makeRequest(version: HttpVersion, headers: (String, String)*) = {
      val request = new DefaultHttpRequest(version, HttpMethod.GET, "/")
      headers foreach { case (k, v) =>
        request.setHeader(k, v)
      }<commit_msg>remove spurious line.<commit_after>package com.twitter.finagle.http

import java.nio.charset.Charset

import org.specs.Specification
import org.specs.mock.Mockito

import org.jboss.netty.channel._
import org.jboss.netty.handler.codec.http._
import org.jboss.netty.buffer.ChannelBuffers

object HttpServerConnectionLifecycleManagerSpec extends Specification with Mockito {
  // > further tests
  //   - malformed requests/responses
  //   - methods other than GET
  //   - 100/continue

  "the HTTP connection lifecycle handler" should {
    val handler = new HttpServerConnectionLifecycleManager
    val me = mock[MessageEvent]
    val c = mock[Channel]
    val ctx = mock[ChannelHandlerContext]
    val cFuture = new DefaultChannelFuture(c, false)
    me.getChannel returns c

    def makeRequest(version: HttpVersion, headers: (String, String)*) = {
      val request = new DefaultHttpRequest(version, HttpMethod.GET, "/")
      headers foreach { case (k, v) =>
        request.setHeader(k, v)
      }
{'fraction_non_alphanumeric': 0.0916988416988417, 'fraction_numerical': 0.003861003861003861, 'mean_word_length': 3.7113636363636364, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1094984', 'n_tokens_mistral': 619, 'n_tokens_neox': 597, 'n_words': 153}