mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Misc
This commit is contained in:
9
ArchiSteamFarm/Localization/Strings.Designer.cs
generated
9
ArchiSteamFarm/Localization/Strings.Designer.cs
generated
@@ -1179,15 +1179,6 @@ namespace ArchiSteamFarm.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wyszukuje zlokalizowany ciąg podobny do ciągu Status code: {0}.
|
||||
/// </summary>
|
||||
internal static string StatusCode {
|
||||
get {
|
||||
return ResourceManager.GetString("StatusCode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wyszukuje zlokalizowany ciąg podobny do ciągu Still idling: {0} ({1}).
|
||||
/// </summary>
|
||||
|
||||
@@ -225,10 +225,6 @@ StackTrace:
|
||||
<data name="Starting" xml:space="preserve">
|
||||
<value>Starting...</value>
|
||||
</data>
|
||||
<data name="StatusCode" xml:space="preserve">
|
||||
<value>Status code: {0}</value>
|
||||
<comment>{0} will be replaced by status code number/name</comment>
|
||||
</data>
|
||||
<data name="Success" xml:space="preserve">
|
||||
<value>Success!</value>
|
||||
</data>
|
||||
|
||||
@@ -366,13 +366,25 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
if (response == null) {
|
||||
if (Debugging.IsUserDebugging) {
|
||||
ArchiLogger.LogGenericDebug("null <- " + httpMethod + " " + requestUri);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
if (Debugging.IsUserDebugging) {
|
||||
ArchiLogger.LogGenericDebug(response.StatusCode + " <- " + httpMethod + " " + requestUri);
|
||||
}
|
||||
|
||||
if (response.IsSuccessStatusCode) {
|
||||
return response;
|
||||
}
|
||||
|
||||
if (Debugging.IsUserDebugging) {
|
||||
ArchiLogger.LogGenericDebug(string.Format(Strings.Content, await response.Content.ReadAsStringAsync().ConfigureAwait(false)));
|
||||
}
|
||||
|
||||
// WARNING: We still have undisposed response by now, make sure to dispose it ASAP if we're not returning it!
|
||||
if ((response.StatusCode >= HttpStatusCode.Ambiguous) && (response.StatusCode < HttpStatusCode.BadRequest) && (maxRedirections > 0)) {
|
||||
Uri redirectUri = response.Headers.Location;
|
||||
@@ -398,15 +410,8 @@ namespace ArchiSteamFarm {
|
||||
return await InternalRequest(redirectUri, httpMethod, data, referer, httpCompletionOption, --maxRedirections).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
using (response) {
|
||||
if (Debugging.IsUserDebugging) {
|
||||
ArchiLogger.LogGenericDebug(string.Format(Strings.ErrorFailingRequest, requestUri));
|
||||
ArchiLogger.LogGenericDebug(string.Format(Strings.StatusCode, response.StatusCode));
|
||||
ArchiLogger.LogGenericDebug(string.Format(Strings.Content, await response.Content.ReadAsStringAsync().ConfigureAwait(false)));
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
response.Dispose();
|
||||
return null;
|
||||
}
|
||||
|
||||
private async Task<StringResponse> UrlGetToString(string request, string referer = null, byte maxTries = MaxTries) {
|
||||
|
||||
Reference in New Issue
Block a user