<commit_before>﻿using System;
using System.IO;
using System.Net;

namespace PreMailer.Net.Downloaders
{
	public class WebDownloader : IWebDownloader
	{
		private static IWebDownloader _sharedDownloader;

		public static IWebDownloader SharedDownloader
		{
			get
			{
				if (_sharedDownloader == null)
				{
					_sharedDownloader = new WebDownloader();
				}

				return _sharedDownloader;
			}
			set
			{
				_sharedDownloader = value;
			}
		}

		public string DownloadString(Uri uri)
		{
			var request = WebRequest.Create(uri);
			using (var response = request.GetResponse())
			using (var stream = response.GetResponseStream())
			using (var reader = new StreamReader(stream))
			{
				return reader.ReadToEnd();
			}
		}
	}
}<commit_msg>Update WebDownloader.cs<commit_after>﻿using System;
using System.IO;
using System.Net;

namespace PreMailer.Net.Downloaders
{
	public class WebDownloader : IWebDownloader
	{
		private static IWebDownloader _sharedDownloader;

		public static IWebDownloader SharedDownloader
		{
			get
			{
				if (_sharedDownloader == null)
				{
					_sharedDownloader = new WebDownloader();
				}

				return _sharedDownloader;
			}
			set
			{
				_sharedDownloader = value;
			}
		}

		public string DownloadString(Uri uri)
		{
			var request = WebRequest.Create(uri);
			using (var response = (HttpWebResponse)request.GetResponse()) {
				string Charset = response.CharacterSet;
				Encoding encoding = Encoding.GetEncoding( Charset );
				using( var stream = response.GetResponseStream( ) )
				using( var reader = new StreamReader( stream, encoding ) ) {
					return reader.ReadToEnd( );
				}
			}
		}
	}
}
{'fraction_non_alphanumeric': 0.09124087591240876, 'fraction_numerical': 0.0, 'mean_word_length': 3.3518518518518516, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 27, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5625333', 'n_tokens_mistral': 630, 'n_tokens_neox': 506, 'n_words': 118}