Skip to content
Browse files

HttpFormDataHandler now uses Uri.UnescapeDataString for UrlDecoding o…

…n windows it parses Unicode request correctly.
  • Loading branch information...
1 parent 78f3d16 commit 09231fa887c4904d3003db0f35a91ac82b32a20e @Yitzchok committed
View
18 src/Manos.IO/Manos.IO.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -21,7 +21,7 @@
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<GenerateDocumentation>true</GenerateDocumentation>
- <NoWarn>1591</NoWarn>
+ <PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@@ -37,17 +37,15 @@
<DefineConstants>ALWAYS_USE_MANAGED_IO</DefineConstants>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\libs\Mono.Posix.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
- <Reference Include="Mono.Posix" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <ItemGroup>
- <Folder Include="Assembly\" />
- <Folder Include="Manos.IO\" />
- <Folder Include="Manos.IO.Libev\" />
- <Folder Include="Manos.IO.Managed\" />
- </ItemGroup>
+ <ItemGroup />
<ItemGroup>
<Compile Include="Assembly\AssemblyInfo.cs" />
<Compile Include="Manos.IO\ByteBuffer.cs" />
@@ -120,4 +118,4 @@
<Target Name="ListSources">
<Message Text="@(Compile)" Importance="High" />
</Target>
-</Project>
+</Project>
View
18 src/Manos.sln
@@ -42,23 +42,14 @@ Global
{5E2AA984-1C9C-4890-BEF6-CC2981C49AFF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{5E2AA984-1C9C-4890-BEF6-CC2981C49AFF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{5E2AA984-1C9C-4890-BEF6-CC2981C49AFF}.Debug|Win32.ActiveCfg = Debug|Any CPU
- {5E2AA984-1C9C-4890-BEF6-CC2981C49AFF}.Debug|Win32.Build.0 = Debug|Any CPU
{5E2AA984-1C9C-4890-BEF6-CC2981C49AFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5E2AA984-1C9C-4890-BEF6-CC2981C49AFF}.Release|Any CPU.Build.0 = Release|Any CPU
{5E2AA984-1C9C-4890-BEF6-CC2981C49AFF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{5E2AA984-1C9C-4890-BEF6-CC2981C49AFF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{5E2AA984-1C9C-4890-BEF6-CC2981C49AFF}.Release|Win32.ActiveCfg = Release|Any CPU
- {5E2AA984-1C9C-4890-BEF6-CC2981C49AFF}.Release|Win32.Build.0 = Release|Any CPU
- {9F5B878D-A04B-4F97-8722-1BCB698EF4E4}.Debug|Any CPU.ActiveCfg = Debug|Win32
- {9F5B878D-A04B-4F97-8722-1BCB698EF4E4}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
- {9F5B878D-A04B-4F97-8722-1BCB698EF4E4}.Debug|Mixed Platforms.Build.0 = Debug|Win32
- {9F5B878D-A04B-4F97-8722-1BCB698EF4E4}.Debug|Win32.ActiveCfg = Debug|Win32
- {9F5B878D-A04B-4F97-8722-1BCB698EF4E4}.Debug|Win32.Build.0 = Debug|Win32
- {9F5B878D-A04B-4F97-8722-1BCB698EF4E4}.Release|Any CPU.ActiveCfg = Release|Win32
- {9F5B878D-A04B-4F97-8722-1BCB698EF4E4}.Release|Mixed Platforms.ActiveCfg = Release|Win32
- {9F5B878D-A04B-4F97-8722-1BCB698EF4E4}.Release|Mixed Platforms.Build.0 = Release|Win32
- {9F5B878D-A04B-4F97-8722-1BCB698EF4E4}.Release|Win32.ActiveCfg = Release|Win32
- {9F5B878D-A04B-4F97-8722-1BCB698EF4E4}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Manos\Manos.csproj
@@ -78,7 +69,4 @@ Global
$3.DirectoryNamespaceAssociation = Flat
$3.ResourceNamePolicy = FileFormatDefault
EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
EndGlobal
View
7 src/Manos/Manos.Http/HttpFormDataHandler.cs
@@ -91,9 +91,10 @@ private void FinishPair (HttpEntity entity)
if (key_buffer.Length == 0)
throw new HttpException ("zero length key in www-form data.");
- Encoding e = entity.ContentEncoding;
- entity.PostData.Set (HttpUtility.UrlDecode (key_buffer.ToString (), e),
- HttpUtility.UrlDecode (value_buffer.ToString (), e));
+ //Encoding e = entity.ContentEncoding;
+ entity.PostData.Set(Uri.UnescapeDataString(key_buffer.ToString()),
+ Uri.UnescapeDataString(value_buffer.ToString()));
+
key_buffer.Length = 0;
value_buffer.Length = 0;
View
24 src/Manos/Manos.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -22,7 +22,7 @@
<ConsolePause>false</ConsolePause>
<GenerateDocumentation>true</GenerateDocumentation>
<NoWarn>1591</NoWarn>
- <PlatformTarget>x86</PlatformTarget>
+ <PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@@ -36,11 +36,18 @@
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="Mono.C5">
+ <HintPath>..\..\libs\Mono.C5.dll</HintPath>
+ </Reference>
+ <Reference Include="Mono.CSharp">
+ <HintPath>..\..\libs\Mono.CSharp.dll</HintPath>
+ </Reference>
+ <Reference Include="Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\libs\Mono.Posix.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
- <Reference Include="Mono.Posix" />
- <Reference Include="Mono.CSharp" />
- <Reference Include="Mono.C5" />
<Reference Include="Nini, Version=1.1.0.0, Culture=neutral, PublicKeyToken=c9892194e1b9ec1b">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\libs\Nini.dll</HintPath>
@@ -169,14 +176,9 @@
</MonoDevelop>
</ProjectExtensions>
<ItemGroup>
- <Folder Include="Manos.Threading\" />
- <Folder Include="Manos.IO\" />
- <Folder Include="Manos.Collections\" />
- </ItemGroup>
- <ItemGroup>
<ProjectReference Include="..\Manos.IO\Manos.IO.csproj">
<Project>{5E2AA984-1C9C-4890-BEF6-CC2981C49AFF}</Project>
<Name>Manos.IO</Name>
</ProjectReference>
</ItemGroup>
-</Project>
+</Project>
View
17 src/manostool/manostool.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -22,7 +22,7 @@
<Commandlineparameters>-data-dir=../../../../../data/</Commandlineparameters>
<GenerateDocumentation>true</GenerateDocumentation>
<NoWarn>1591</NoWarn>
- <PlatformTarget>x86</PlatformTarget>
+ <PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@@ -35,9 +35,12 @@
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\libs\Mono.Posix.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
- <Reference Include="Mono.Posix" />
</ItemGroup>
<ItemGroup>
<Compile Include="Driver.cs" />
@@ -53,14 +56,14 @@
<Compile Include="Loader.cs" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\Manos\Manos.csproj">
- <Project>{2548B25A-2E1F-4E21-BC43-7E39B1F6F23F}</Project>
- <Name>Manos</Name>
- </ProjectReference>
<ProjectReference Include="..\Manos.IO\Manos.IO.csproj">
<Project>{5E2AA984-1C9C-4890-BEF6-CC2981C49AFF}</Project>
<Name>Manos.IO</Name>
</ProjectReference>
+ <ProjectReference Include="..\Manos\Manos.csproj">
+ <Project>{2548B25A-2E1F-4E21-BC43-7E39B1F6F23F}</Project>
+ <Name>Manos</Name>
+ </ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Target Name="ListSources">

0 comments on commit 09231fa

Please sign in to comment.
Something went wrong with that request. Please try again.