mirror of
https://github.com/tokio-rs/axum.git
synced 2024-12-29 15:49:16 +01:00
Add space between SSE field and value for compatibility (#2149)
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
This commit is contained in:
parent
65defdb463
commit
268ba08e8e
2 changed files with 8 additions and 9 deletions
|
@ -64,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- **change:** axum's MSRV is now 1.63 ([#2021])
|
- **change:** axum's MSRV is now 1.63 ([#2021])
|
||||||
- **added:** Implement `Handler` for `T: IntoResponse` ([#2140])
|
- **added:** Implement `Handler` for `T: IntoResponse` ([#2140])
|
||||||
- **added:** Implement `IntoResponse` for `(R,) where R: IntoResponse` ([#2143])
|
- **added:** Implement `IntoResponse` for `(R,) where R: IntoResponse` ([#2143])
|
||||||
|
- **changed:** For SSE, add space between field and value for compatibility ([#2149])
|
||||||
|
|
||||||
[#2021]: https://github.com/tokio-rs/axum/pull/2021
|
[#2021]: https://github.com/tokio-rs/axum/pull/2021
|
||||||
[#2014]: https://github.com/tokio-rs/axum/pull/2014
|
[#2014]: https://github.com/tokio-rs/axum/pull/2014
|
||||||
|
@ -82,6 +83,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
[#2096]: https://github.com/tokio-rs/axum/pull/2096
|
[#2096]: https://github.com/tokio-rs/axum/pull/2096
|
||||||
[#2140]: https://github.com/tokio-rs/axum/pull/2140
|
[#2140]: https://github.com/tokio-rs/axum/pull/2140
|
||||||
[#2143]: https://github.com/tokio-rs/axum/pull/2143
|
[#2143]: https://github.com/tokio-rs/axum/pull/2143
|
||||||
|
[#2149]: https://github.com/tokio-rs/axum/pull/2149
|
||||||
|
|
||||||
# 0.6.17 (25. April, 2023)
|
# 0.6.17 (25. April, 2023)
|
||||||
|
|
||||||
|
|
|
@ -358,10 +358,7 @@ impl Event {
|
||||||
);
|
);
|
||||||
self.buffer.extend_from_slice(name.as_bytes());
|
self.buffer.extend_from_slice(name.as_bytes());
|
||||||
self.buffer.put_u8(b':');
|
self.buffer.put_u8(b':');
|
||||||
// Prevent values that start with spaces having that space stripped
|
|
||||||
if value.starts_with(b" ") {
|
|
||||||
self.buffer.put_u8(b' ');
|
self.buffer.put_u8(b' ');
|
||||||
}
|
|
||||||
self.buffer.extend_from_slice(value);
|
self.buffer.extend_from_slice(value);
|
||||||
self.buffer.put_u8(b'\n');
|
self.buffer.put_u8(b'\n');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue