<commit_before>package glutton

import (
	"bufio"
	"log"
	"net"
	"net/http"
)

func handleHTTP(conn net.Conn) error {
	defer conn.Close()
	req, err := http.ReadRequest(bufio.NewReader(conn))
	if err != nil {
		log.Println(err)
		return err
	}
	log.Printf("%+v", req)
	conn.Write([]byte("HTTP/1.1 200 OK\r\n\r\n"))
	return nil
}
<commit_msg>having a look at the http payload<commit_after>package glutton

import (
	"bufio"
	"log"
	"net"
	"net/http"
)

func handleHTTP(conn net.Conn) error {
	defer conn.Close()
	req, err := http.ReadRequest(bufio.NewReader(conn))
	if err != nil {
		log.Println(err)
		return err
	}
	log.Printf("%+v", req)
	if req.ContentLength > 0 {
		buf := new([]byte)
		req.Body.Read(*buf)
		log.Println(string(*buf))
	}
	conn.Write([]byte("HTTP/1.1 200 OK\r\n\r\n"))
	return nil
}

{'fraction_non_alphanumeric': 0.17830423940149626, 'fraction_numerical': 0.01371571072319202, 'mean_word_length': 3.8373493975903616, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5402856', 'n_tokens_mistral': 352, 'n_tokens_neox': 338, 'n_words': 71}