Changeset 469 for TFP-WebServer/SpaceWizards.HttpListener
- Timestamp:
- Aug 19, 2023, 9:44:10 PM (15 months ago)
- Location:
- TFP-WebServer/SpaceWizards.HttpListener
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TFP-WebServer/SpaceWizards.HttpListener/SpaceWizards.HttpListener.csproj
r453 r469 35 35 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 36 36 <OutputPath>..\bin\Mods\TFP_WebServer\</OutputPath> 37 <DebugType> full</DebugType>37 <DebugType>portable</DebugType> 38 38 <AllowUnsafeBlocks>true</AllowUnsafeBlocks> 39 39 <DefineConstants>UNITY_NETFRAMEWORK</DefineConstants> … … 44 44 <DefineConstants>UNITY_NETFRAMEWORK;ENABLE_PROFILER</DefineConstants> 45 45 <DebugSymbols>true</DebugSymbols> 46 <DebugType> full</DebugType>46 <DebugType>portable</DebugType> 47 47 <AllowUnsafeBlocks>true</AllowUnsafeBlocks> 48 48 </PropertyGroup> -
TFP-WebServer/SpaceWizards.HttpListener/src/System/Net/HttpListenerRequest.cs
r377 r469 78 78 } 79 79 80 // TFP: Added to manually set the encoding used for the query parameters 81 private Encoding contentEncoding; 80 82 public Encoding ContentEncoding 81 83 { 82 84 get 83 85 { 86 if (contentEncoding != null) { 87 return contentEncoding; 88 } 89 84 90 if (UserAgent != null && CultureInfo.InvariantCulture.CompareInfo.IsPrefix(UserAgent, "UP")) 85 91 { … … 89 95 try 90 96 { 91 return Encoding.GetEncoding(postDataCharset); 97 contentEncoding = Encoding.GetEncoding(postDataCharset); 98 return contentEncoding; 92 99 } 93 100 catch (ArgumentException) … … 105 112 try 106 113 { 107 return Encoding.GetEncoding(charSet); 114 contentEncoding = Encoding.GetEncoding(charSet); 115 return contentEncoding; 108 116 } 109 117 catch (ArgumentException) … … 113 121 } 114 122 } 115 return Encoding.Default; 123 contentEncoding = Encoding.Default; 124 return contentEncoding; 125 } 126 set 127 { 128 contentEncoding = value; 116 129 } 117 130 }
Note:
See TracChangeset
for help on using the changeset viewer.