Skip to content
Permalink
Browse files

Use https:// to avoid a redirect, set timeout as 10 seconds

  • Loading branch information...
UnknownShadow200 committed Jul 4, 2017
1 parent 8df09d1 commit 3cd6d70ddce0ee91e9a1a99c5820aa22a2449720
Showing with 3 additions and 1 deletion.
  1. +3 −1 fCraft/Player/Chat.cs
@@ -103,7 +103,9 @@ public static class Chat
MatchCollection urlMatches = RegexURLMatcher.Matches(rawMessage);
foreach (Match match in urlMatches) {
if (fullUrls.Count() < 5) {
var request = (HttpWebRequest)WebRequest.Create("http://123dmwm.tk/unshorten.php?url=" + match.ToString());
Uri uri = new Uri("https://123dmwm.tk/unshorten.php?url=" + match.ToString());
HttpWebRequest request = HttpUtil.CreateRequest(uri, TimeSpan.FromSeconds(10));

string fullUrl = null;
using (var response = (HttpWebResponse)request.GetResponse()) {
var encoding = Encoding.GetEncoding(response.CharacterSet);

0 comments on commit 3cd6d70

Please sign in to comment.
You can’t perform that action at this time.