<commit_before>﻿using System;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;
using System.Security.Authentication;
using System.Globalization;

namespace Ceen.Httpd
{
	/// <summary>
	/// Configuration of a server instance
	/// </summary>
	public class ServerConfig
	{
		/// <summary>
		/// The socket backlog.
		/// </summary>
		public int SocketBacklog { get; set; } = 5;
		/// <summary>
		/// The maximum size of the request line.
		/// </summary>
		public int MaxRequestLineSize { get; set; } = 8 * 1024;
		/// <summary>
		/// The maximum size of the request header.
		/// </summary>
		public int MaxRequestHeaderSize { get; set; } = 64 * 1024;
		/// <summary>
		/// The maximum number of active requests.
		/// </summary>
		public int MaxActiveRequests { get; set; } = 500000;
		/// <summary>
		/// The maximum number of internal redirects
		/// </summary>
		public int MaxInternalRedirects { get; set; } = 5;

		/// <summary>
		/// The maximum size of a POST request with url encoded data.
		/// This is also the maximum size allowed for automatically
		/// decoding multipart form data.
		/// </summary>
		public int MaxUrlEncodedFormSize { get; set; } = 5 * 1024 * 1024;

		/// <summary>
		/// Allow automatic parsing of multipart form data
		/// </summary>
		public bool AutoParseMultipartFormData { get; set; } = true;

		/// <summary>
		/// The maximum size of a POST request
		/// </summary>
		public long MaxPostSize { get; set; } = 100 * 1024 * 1024;

		/// <summary>
		/// A flag indicating if the X-HTTP-Method-Override header is supported
		/// </summary>
		public bool AllowHttpMethodOverride { get; set; } = true;

		/// <summary>
		/// A value indicating the name of the header, 
		/// the proxy uses to communicate the source IP of the request.
		/// Commonly this is set to &quot;X-Real-IP&quot; or &quot;X-Forwarded-For&quot;
		/// Leave blank to disable.
		/// </summary>
		public string AllowedSourceIPHeaderValue { get; set; } = null;

		/// <summary>
		/// The request idle timeout in seconds.
		/// </summary>
		public int RequestIdleTimeoutSeconds { get; set; } = 5;
		/// <summary>
		/// The request header read timeout in seconds.
		/// </summary>
		public int RequestHeaderReadTimeoutSeconds { get; set; } = 10;
		/// <summary>
		/// The maximum number of requests to server with a single connection.
		/// </summary>
		public int KeepAliveMaxRequests { get; set; } = 30;
		/// <summary>
		/// The keep-alive timeout in seconds
		/// </summary>
		public int KeepAliveTimeoutSeconds { get; set; } = 10;
		/// <summary>
		/// The router instance to use for handling requests
		/// </summary>
		public IRouter Router { get; set; }
		/// <summary>
		/// The logger instance to use
		/// </summary>
		public IList<ILogger> Loggers { get; set; }
		/// <summary>
		/// The loaded module instance
		/// </summary>
		public IList<IModule> Modules { get; set; }
		/// <summary>
		/// A callback method for injecting headers into the responses
		/// </summary>
		public Action<IHttpResponse> AddDefaultResponseHeaders { get; set; }

		/// <summary><commit_msg>Typo fix<commit_after>﻿using System;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;
using System.Security.Authentication;
using System.Globalization;

namespace Ceen.Httpd
{
	/// <summary>
	/// Configuration of a server instance
	/// </summary>
	public class ServerConfig
	{
		/// <summary>
		/// The socket backlog.
		/// </summary>
		public int SocketBacklog { get; set; } = 5;
		/// <summary>
		/// The maximum size of the request line.
		/// </summary>
		public int MaxRequestLineSize { get; set; } = 8 * 1024;
		/// <summary>
		/// The maximum size of the request header.
		/// </summary>
		public int MaxRequestHeaderSize { get; set; } = 64 * 1024;
		/// <summary>
		/// The maximum number of active requests.
		/// </summary>
		public int MaxActiveRequests { get; set; } = 500000;
		/// <summary>
		/// The maximum number of internal redirects
		/// </summary>
		public int MaxInternalRedirects { get; set; } = 5;

		/// <summary>
		/// The maximum size of a POST request with url encoded data.
		/// This is also the maximum size allowed for automatically
		/// decoding multipart form data.
		/// </summary>
		public int MaxUrlEncodedFormSize { get; set; } = 5 * 1024 * 1024;

		/// <summary>
		/// Allow automatic parsing of multipart form data
		/// </summary>
		public bool AutoParseMultipartFormData { get; set; } = true;

		/// <summary>
		/// The maximum size of a POST request
		/// </summary>
		public long MaxPostSize { get; set; } = 100 * 1024 * 1024;

		/// <summary>
		/// A flag indicating if the X-HTTP-Method-Override header is supported
		/// </summary>
		public bool AllowHttpMethodOverride { get; set; } = true;

		/// <summary>
		/// A value indicating the name of the header, 
		/// the proxy uses to communicate the source IP of the request.
		/// Commonly this is set to &quot;X-Real-IP&quot; or &quot;X-Forwarded-For&quot;
		/// Leave blank to disable.
		/// </summary>
		public string AllowedSourceIPHeaderValue { get; set; } = null;

		/// <summary>
		/// The request idle timeout in seconds.
		/// </summary>
		public int RequestIdleTimeoutSeconds { get; set; } = 5;
		/// <summary>
		/// The request header read timeout in seconds.
		/// </summary>
		public int RequestHeaderReadTimeoutSeconds { get; set; } = 10;
		/// <summary>
		/// The maximum number of requests to server with a single connection.
		/// </summary>
		public int KeepAliveMaxRequests { get; set; } = 30;
		/// <summary>
		/// The keep-alive timeout in seconds
		/// </summary>
		public int KeepAliveTimeoutSeconds { get; set; } = 10;
		/// <summary>
		/// The router instance to use for handling requests
		/// </summary>
		public IRouter Router { get; set; }
		/// <summary>
		/// The logger instances to use
		/// </summary>
		public IList<ILogger> Loggers { get; set; }
		/// <summary>
		/// The loaded module instance
		/// </summary>
		public IList<IModule> Modules { get; set; }
		/// <summary>
		/// A callback method for injecting headers into the responses
		/// </summary>
		public Action<IHttpResponse> AddDefaultResponseHeaders { get; set; }

		/// <summary>
{'fraction_non_alphanumeric': 0.1426302414231258, 'fraction_numerical': 0.015565438373570521, 'mean_word_length': 2.652552204176334, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 87, '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': '7429476', 'n_tokens_mistral': 2124, 'n_tokens_neox': 1853, 'n_words': 666}