<commit_before>extern crate hyper;

use std::io::Write;

use hyper::Server;
use hyper::server::Request;
use hyper::server::Response;
use hyper::net::Fresh;

fn hello(_: Request, res: Response<Fresh>) {
    let mut res = res.start().unwrap();
    res.write_all(b"Hello World!").unwrap();
    res.end().unwrap();
}

fn main() {
    Server::http(hello).listen("127.0.0.1:3000").unwrap();
}
<commit_msg>Initial req parts logging<commit_after>extern crate hyper;

use std::io::Write;

use hyper::Server;
use hyper::server::Request;
use hyper::server::Response;
use hyper::net::Fresh;
use hyper::uri::RequestUri;

fn hello(req: Request, res: Response<Fresh>) {
    let mut res = res.start().unwrap();

    let path = match req.uri {
      RequestUri::AbsolutePath(str) => str,
      _ => "".to_string()
    };

    println!("path: {}", path);
    println!("remoteAddy: {}", req.remote_addr);
    println!("method: {}", req.method);
    
    res.write_all(b"Hello").unwrap();
    res.end().unwrap();
}

fn main() {
    Server::http(hello).listen("127.0.0.1:3000").unwrap();
}

{'fraction_non_alphanumeric': 0.2048643592142189, 'fraction_numerical': 0.018709073900841908, 'mean_word_length': 4.404040404040404, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3769197', 'n_tokens_mistral': 380, 'n_tokens_neox': 370, 'n_words': 73}