Changeset 389 for binary-improvements2/MapRendering/Web/WebUtils.cs
- Timestamp:
- Aug 7, 2022, 1:11:51 AM (2 years ago)
- Location:
- binary-improvements2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2
- Property svn:ignore
-
old new 1 .idea 1 2 bin 2 .idea 3 server-fixes.sln.DotSettings.user
-
- Property svn:ignore
-
binary-improvements2/MapRendering
- Property svn:ignore
-
old new 1 bin 1 2 obj
-
- Property svn:ignore
-
binary-improvements2/MapRendering/Web/WebUtils.cs
r387 r389 25 25 netWriteSampler.Begin (); 26 26 #endif 27 WriteText (_resp, sb.ToString(), _ mimeType:MimeJson);27 WriteText (_resp, sb.ToString(), _statusCode, MimeJson); 28 28 #if ENABLE_PROFILER 29 29 netWriteSampler.End (); … … 32 32 33 33 public static void WriteText (HttpListenerResponse _resp, string _text, HttpStatusCode _statusCode = HttpStatusCode.OK, string _mimeType = null) { 34 _resp.StatusCode = (int)_statusCode; 35 _resp.ContentType = _mimeType ?? MimePlain; 36 _resp.ContentEncoding = Encoding.UTF8; 37 34 38 byte[] buf = Encoding.UTF8.GetBytes (_text); 35 39 _resp.ContentLength64 = buf.Length; 36 40 _resp.OutputStream.Write (buf, 0, buf.Length); 37 38 _resp.ContentType = _mimeType ?? MimePlain;39 _resp.ContentEncoding = Encoding.UTF8;40 _resp.StatusCode = (int)_statusCode;41 41 } 42 42
Note:
See TracChangeset
for help on using the changeset viewer.