Skip to content

Commit 3369f45

Browse files
committed
stream: change HeaderContentSeparator to "\r\n\r\n"
1 parent 31b1683 commit 3369f45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stream.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const (
3838
HeaderContentType = "Content-Type"
3939

4040
// HeaderContentSeparator is the header and content part separator.
41-
HeaderContentSeparator = "\r\n"
41+
HeaderContentSeparator = "\r\n\r\n"
4242
)
4343

4444
// Stream abstracts the transport mechanics from the JSON-RPC protocol.
@@ -132,7 +132,7 @@ func (s *stream) Write(ctx context.Context, data []byte) (total int64, err error
132132

133133
s.outMu.Lock()
134134
var n int
135-
msg := HeaderContentLength + ": " + strconv.FormatInt(int64(len(data)), 10) + HeaderContentSeparator + HeaderContentSeparator
135+
msg := HeaderContentLength + ": " + strconv.FormatInt(int64(len(data)), 10) + HeaderContentSeparator
136136
n, err = s.out.Write([]byte(msg))
137137
total = int64(n)
138138
if err == nil {

0 commit comments

Comments
 (0)