forked from lavina/lavina
xmpp: ignore text elements with spaces at the stream root
This commit is contained in:
parent
8b099f9be2
commit
cccc05afe9
|
@ -372,7 +372,7 @@ async fn socket_final(
|
||||||
res = &mut next_xml_event => 's: {
|
res = &mut next_xml_event => 's: {
|
||||||
let (ns, event) = res?;
|
let (ns, event) = res?;
|
||||||
if let Event::Text(ref e) = event {
|
if let Event::Text(ref e) = event {
|
||||||
if e.iter().all(|x| *x == 0xA) {
|
if e.iter().all(|x| *x == b'\n' || *x == b' ') {
|
||||||
break 's true;
|
break 's true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue