Merge branch '5.3.x'

This commit is contained in:
Arjen Poutsma
2021-09-28 15:00:33 +02:00
2 changed files with 21 additions and 1 deletions

View File

@@ -147,7 +147,13 @@ public class ServerSentEventHttpMessageReader implements HttpMessageReader<Objec
for (String line : lines) {
if (line.startsWith("data:")) {
data = (data != null ? data : new StringBuilder());
data.append(line.substring(5).trim()).append('\n');
if (line.charAt(5) != ' ') {
data.append(line, 5, line.length());
}
else {
data.append(line, 6, line.length());
}
data.append('\n');
}
if (shouldWrap) {
if (line.startsWith("id:")) {