Commit e090929
committed
stream: Allow sending data in the preread phase
There are cases when some interactions should happen between the client
and the server before a successful preread. This patch enables sending
data to the client in the preread phase. To avoid possible conflict
between the preread callback and filtering callbacks, the data sent
bypasses `js_body_filter`, but not other filters, if any.
This patch introduces a new field in ngx_stream_js_ctx_t named `preread`
to indicate if the session is now in the preread phase.1 parent dc4232e commit e090929
1 file changed
Lines changed: 53 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
436 | 437 | | |
437 | 438 | | |
438 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
439 | 444 | | |
440 | 445 | | |
441 | 446 | | |
442 | 447 | | |
443 | 448 | | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
444 | 456 | | |
445 | 457 | | |
446 | | - | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
447 | 484 | | |
448 | 485 | | |
449 | 486 | | |
| |||
553 | 590 | | |
554 | 591 | | |
555 | 592 | | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
556 | 597 | | |
557 | 598 | | |
558 | 599 | | |
| |||
1122 | 1163 | | |
1123 | 1164 | | |
1124 | 1165 | | |
1125 | | - | |
| 1166 | + | |
1126 | 1167 | | |
1127 | 1168 | | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
1128 | 1172 | | |
1129 | 1173 | | |
1130 | 1174 | | |
1131 | 1175 | | |
1132 | 1176 | | |
1133 | 1177 | | |
1134 | 1178 | | |
1135 | | - | |
1136 | | - | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
1137 | 1186 | | |
1138 | 1187 | | |
1139 | 1188 | | |
| |||
0 commit comments