mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
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:
@@ -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();
|
||||
|
||||
@@ -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('='))
|
||||
|
||||
@@ -42,6 +42,10 @@ namespace RuriLib
|
||||
private bool ignoreResponseErrors = false;
|
||||
/// <summary>Whether to proceed if an HTTP request fails instead of giving the ERROR status.</summary>
|
||||
public bool IgnoreResponseErrors { get { return ignoreResponseErrors; } set { ignoreResponseErrors = value; OnPropertyChanged(); } }
|
||||
|
||||
private int _maxRedirects = 8;
|
||||
/// <summary>The maximum amount of times we can be redirected to different URLs for a single request.</summary>
|
||||
public int MaxRedirects { get { return _maxRedirects; } set { _maxRedirects = value; OnPropertyChanged(); } }
|
||||
#endregion
|
||||
|
||||
#region Proxy
|
||||
|
||||
Reference in New Issue
Block a user