Changeset 469 for TFP-WebServer/SpaceWizards.HttpListener/src/System
- Timestamp:
- Aug 19, 2023, 9:44:10 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.