Use CRLF for newlines (#18)
* Update newlines to \r\n * fix ndjson_stream newline change --------- Co-authored-by: Foretack <69414142+Foretack@users.noreply.github.com> Co-authored-by: boring_nick <boring-nick@users.noreply.github.com>
This commit is contained in:
parent
1171651732
commit
9732b9c474
|
@ -45,7 +45,7 @@ impl IntoResponse for LogsResponse {
|
|||
match self.response_type {
|
||||
LogsResponseType::Raw => {
|
||||
let stream = self.stream.map_ok(|mut line| {
|
||||
line.push('\n');
|
||||
line.push_str("\r\n");
|
||||
line
|
||||
});
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ impl Stream for NdJsonLogsStream {
|
|||
|
||||
for message_buf in serialized_messages {
|
||||
buf.extend(message_buf);
|
||||
buf.push(b'\n');
|
||||
buf.extend(b"\r\n");
|
||||
}
|
||||
|
||||
Ok(buf)
|
||||
|
|
|
@ -37,8 +37,8 @@ impl Stream for TextLogsStream {
|
|||
let irc_messages = parse_raw(chunk);
|
||||
let messages: Vec<FullMessage> = parse_messages(&irc_messages).collect();
|
||||
|
||||
let mut text = messages.iter().join('\n').to_string();
|
||||
text.push('\n');
|
||||
let mut text = messages.iter().join("\r\n").to_string();
|
||||
text.push_str("\r\n");
|
||||
|
||||
Ok(text)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue