Skip to content

Commit 1eb4ac4

Browse files
author
Arnaud Bouchez
committed
fixed HTTP pipelined process in async server
1 parent 1c99025 commit 1eb4ac4

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

src/mormot.commit.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
'2.1.5292'
1+
'2.1.5293'

src/net/mormot.net.async.pas

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3195,13 +3195,18 @@ function THttpAsyncConnection.OnRead: TPollAsyncSocketOnReadWrite;
31953195
result := soClose;
31963196
end;
31973197
end;
3198-
if fPipelinedWrite and
3199-
(fWR.Len > 128 shl 10) then // flush more than 128KB of pending output
3200-
if FlushPipelinedWrite <> soContinue then
3201-
result := soClose;
3202-
if (result <> soContinue) or
3203-
(fHttp.State in [hrsGetCommand, hrsUpgraded]) then
3204-
break; // rejected or upgraded
3198+
if fPipelinedWrite then
3199+
begin
3200+
if fWR.Len > 128 shl 10 then // flush more than 128KB of pending output
3201+
if FlushPipelinedWrite <> soContinue then
3202+
result := soClose;
3203+
if (result <> soContinue) or
3204+
(fHttp.State in [hrsUpgraded]) then
3205+
break; // rejected or upgraded
3206+
end
3207+
else if (result <> soContinue) or
3208+
(fHttp.State in [hrsGetCommand, hrsUpgraded]) then
3209+
break; // authenticated, rejected or upgraded
32053210
end;
32063211
if fPipelinedWrite then
32073212
if FlushPipelinedWrite <> soContinue then

0 commit comments

Comments
 (0)