Now you can write \n to send an actual \n instead of a new line in the POST data.

This commit is contained in:
ruri
2019-09-29 23:09:36 +02:00
parent ed1c7e8ffa
commit 62801c8018
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -547,7 +547,7 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Main\Runner\Runner.xaml">
<Page Include="Pages\Main\Settings\OB\Runner\Runner.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
@@ -559,7 +559,7 @@
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Pages\Main\Runner\Runner.xaml.cs">
<Compile Include="Pages\Main\Settings\OB\Runner\Runner.xaml.cs">
<DependentUpon>Runner.xaml</DependentUpon>
</Compile>
<Compile Include="MainWindow.xaml.cs">
+3 -3
View File
@@ -6,6 +6,7 @@ using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Media;
namespace RuriLib
@@ -401,9 +402,8 @@ namespace RuriLib
switch (requestType)
{
case RequestType.Standard:
var pData = string.Join(Environment.NewLine, postData
.Split(new string[] { "\\n" }, StringSplitOptions.None)
.Select(p => ReplaceValues(p, data)));
var pData = ReplaceValues(Regex.Replace(postData, @"(?<!\\)\\n", Environment.NewLine).Replace(@"\\n", @"\n"), data);
if (CanContainBody(method))
{
if (encodeContent)