Added an option in Config -> Other Options -> Requests to change the max amount of redirects allowed for the requests in a certain config.

This commit is contained in:
ruri
2019-05-09 00:54:18 +02:00
parent c227ffed2b
commit a2cc07a100
4 changed files with 16 additions and 2 deletions
+1
View File
@@ -287,6 +287,7 @@ namespace RuriLib
/// <param name="variableName">The name of the variable to create</param>
/// <param name="prefix">The string to add at the start of the value</param>
/// <param name="suffix">The string to add at the end of the value</param>
/// <param name="urlEncode">Whether to URLencode the values before creating the variables</param>
public static void InsertVariables(BotData data, bool isCapture, bool recursive, List<string> values, string variableName, string prefix, string suffix, bool urlEncode)
{
var list = values.Select(v => ReplaceValues(prefix, data) + v.Trim() + ReplaceValues(suffix, data)).ToList();
+1
View File
@@ -350,6 +350,7 @@ namespace RuriLib
request.ReadWriteTimeout = timeout;
request.ConnectTimeout = timeout;
request.KeepAlive = true;
request.MaximumAutomaticRedirections = data.ConfigSettings.MaxRedirects;
// Check if it has GET parameters
if (ParseQuery && localUrl.Contains('?') && localUrl.Contains('='))