<commit_before>#! /usr/bin/perl -w
BEGIN {
    # add current source dir to the include-path
    # we need this for make distcheck
   (my $srcdir = $0) =~ s#/[^/]+$#/#;
   unshift @INC, $srcdir;
}

use strict;
use Test::More tests => 44;
use LightyTest;

my $tf = LightyTest->new();

my $t;

SKIP: {
	skip "no PHP running on port 1026", 27 if $tf->pidof("php") == -1; 

	ok($tf->start_proc == 0, "Starting lighttpd") or die();

	$t->{REQUEST} = ( <<EOF
GET /phpinfo.php HTTP/1.0
Host: www.example.org
EOF
 );
	$t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } );
	ok($tf->handle_http($t) == 0, 'valid request');<commit_msg>off by one in the skip count<commit_after>#! /usr/bin/perl -w
BEGIN {
    # add current source dir to the include-path
    # we need this for make distcheck
   (my $srcdir = $0) =~ s#/[^/]+$#/#;
   unshift @INC, $srcdir;
}

use strict;
use Test::More tests => 44;
use LightyTest;

my $tf = LightyTest->new();

my $t;

SKIP: {
	skip "no PHP running on port 1026", 28 if $tf->pidof("php") == -1; 

	ok($tf->start_proc == 0, "Starting lighttpd") or die();

	$t->{REQUEST} = ( <<EOF
GET /phpinfo.php HTTP/1.0
Host: www.example.org
EOF
 );
	$t->{RESPONSE} = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } );
	ok($tf->handle_http($t) == 0, 'valid request');
{'fraction_non_alphanumeric': 0.21390374331550802, 'fraction_numerical': 0.029029793735676088, 'mean_word_length': 3.410774410774411, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1833722', 'n_tokens_mistral': 569, 'n_tokens_neox': 532, 'n_words': 149}