StreamWriter.WriteLine write LF line break code on Linux

I face to misterius issue.

OData batch response of multipart/mixed can not be parsed on Linux. It's good on Windows.

I check OData source code. And I've found what I think is the cause.

OData batch response write the content using by RawValueWriter. And RawValueWriter use StreamWriter.

StreamWrite use Environment.NewLineConst.,f3a16a4f25483a3f,references

Environment.NewLineConst is LF on Unix,5fbfd9f39ec095a7

You know HTTP multipart content is need CRLF. If you create http writer, you should not use what is dependent on the environment like as StreamWriter.

This issue was fixed in

You'll only receive email when they publish something new.

More from iwate
All posts