Selenium Tests
This commit is contained in:
@@ -25,6 +25,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using Duplicati.Server.Serialization.Interface;
|
||||
using Duplicati.Library.RestAPI;
|
||||
using Duplicati.Library.RestAPI.Abstractions;
|
||||
|
||||
namespace Duplicati.Server.WebServer.RESTMethods
|
||||
{
|
||||
@@ -636,7 +637,7 @@ namespace Duplicati.Server.WebServer.RESTMethods
|
||||
return;
|
||||
}
|
||||
|
||||
var delete_remote_files = Library.Utility.Utility.ParseBool(info.Request.Param["delete-remote-files"].Value, false);
|
||||
var delete_remote_files = info.Request is IModernHttpRequestAccess request && Library.Utility.Utility.ParseBool(request.GetQueryParam("delete-remote-files"), false);
|
||||
|
||||
if (delete_remote_files)
|
||||
{
|
||||
|
||||
@@ -224,8 +224,19 @@ namespace Duplicati.Server.WebServer.RESTMethods
|
||||
{
|
||||
string url;
|
||||
|
||||
using(var sr = new System.IO.StreamReader(info.Request.Body, System.Text.Encoding.UTF8, true))
|
||||
url = sr.ReadToEnd();
|
||||
using (var sr = new System.IO.StreamReader(info.Request.Body, System.Text.Encoding.UTF8, true))
|
||||
{
|
||||
try
|
||||
{
|
||||
url = sr.ReadToEnd();
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
url = sr.ReadLineAsync().Result;
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine(url);
|
||||
|
||||
switch (key)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user