bugfix
This commit is contained in:
parent
d6c2363da2
commit
694b488f0d
@ -210,13 +210,11 @@ bricks.HttpResponseStream = class extends bricks.HttpResponse {
|
||||
while (!result.done) {
|
||||
const text = decoder.decode(result.value);
|
||||
buff_ += text;
|
||||
const newline = /\r?\n/gm;
|
||||
var rez = newline.exec(buff_);
|
||||
while (rez){
|
||||
handler(buff_.substring(0, rez.index));
|
||||
buff_ = buff_.substr(newline.lastIndex);
|
||||
rez = newline.exec(buff_);
|
||||
const lines = buff_.split('\n');
|
||||
for (var i=0;i<lines.length - 1; i++){
|
||||
handler(lines[i]);
|
||||
}
|
||||
buff_ = lines[lines.length - 1];
|
||||
result = await reader.read()
|
||||
}
|
||||
if (buff_ != ''){
|
||||
|
Loading…
Reference in New Issue
Block a user