mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-07 17:12:44 +01:00
Simplify logic in HandleRequest
This commit is contained in:
parent
5b82decc31
commit
0e7eaa9221
1 changed files with 3 additions and 6 deletions
|
|
@ -716,16 +716,13 @@ protected async Task<HttpResponse> HandleRequest(RequestBlock request, Dictionar
|
||||||
|
|
||||||
if (queryCollection.Count > 0)
|
if (queryCollection.Count > 0)
|
||||||
{
|
{
|
||||||
if (!requestLinkStr.Contains("?"))
|
if (!requestLinkStr.Contains('?'))
|
||||||
{
|
{
|
||||||
requestLinkStr += "?";
|
requestLinkStr += "?";
|
||||||
|
}
|
||||||
|
|
||||||
requestLinkStr += queryCollection.GetQueryString(_encoding, separator: request.Queryseparator);
|
requestLinkStr += queryCollection.GetQueryString(_encoding, separator: request.Queryseparator);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
requestLinkStr += queryCollection.GetQueryString(separator: request.Queryseparator);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var httpRequest = new HttpRequestBuilder(requestLinkStr)
|
var httpRequest = new HttpRequestBuilder(requestLinkStr)
|
||||||
.SetCookies(Cookies ?? new Dictionary<string, string>())
|
.SetCookies(Cookies ?? new Dictionary<string, string>())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue