Changeset 422 for binary-improvements2/WebServer/src/WebUtils.cs
- Timestamp:
- Mar 28, 2023, 5:40:08 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/WebServer/src/WebUtils.cs
r404 r422 24 24 _resp.ContentEncoding = Encoding.UTF8; 25 25 26 byte[] buf = Encoding.UTF8.GetBytes (_text); 27 _resp.ContentLength64 = buf.Length; 28 _resp.OutputStream.Write (buf, 0, buf.Length); 26 if (string.IsNullOrEmpty (_text)) { 27 _resp.ContentLength64 = 0; 28 } else { 29 byte[] buf = Encoding.UTF8.GetBytes (_text); 30 _resp.ContentLength64 = buf.Length; 31 _resp.OutputStream.Write (buf, 0, buf.Length); 32 } 29 33 } 30 34
Note:
See TracChangeset
for help on using the changeset viewer.