Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 0d6a309

Browse files
authored
Merge pull request #494 from ServiceStack/netcore
Fix mono exception when write empty string to HttpResponse
2 parents 473288c + 77c419f commit 0d6a309

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ServiceStack.Text/DirectStreamWriter.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ public DirectStreamWriter(Stream stream, Encoding encoding)
2525

2626
public override void Write(string s)
2727
{
28+
if (s.IsNullOrEmpty())
29+
return;
30+
2831
if (s.Length <= optimizedBufferLength)
2932
{
3033
if (needFlush)

0 commit comments

Comments
 (0)