Commit 1f20654
fix: prevent postprocessor/errorHandler from overriding HTTP_STATUS_UNFINISHED
When a handler returns HTTP_STATUS_UNFINISHED (e.g., sendLargeFile), the
postprocessor's return value was overwriting status_code, causing the
connection to be treated as complete. This resulted in a premature empty
response being sent and the connection being reset/closed.
The fix uses local variables for the postprocessor and errorHandler return
values, only checking for HTTP_STATUS_CLOSE without modifying status_code.
This preserves the UNFINISHED status while still supporting the
HTTP_STATUS_CLOSE feature added in commit 62cd137.
Agent-Logs-Url: https://github.com/ithewei/libhv/sessions/aa478496-9e54-4c62-b0f7-810817b3867f
Co-authored-by: ithewei <26049660+ithewei@users.noreply.github.com>1 parent 1f32c9d commit 1f20654
1 file changed
+7
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
490 | 494 | | |
491 | 495 | | |
492 | 496 | | |
493 | 497 | | |
494 | 498 | | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | 499 | | |
501 | 500 | | |
502 | 501 | | |
| |||
505 | 504 | | |
506 | 505 | | |
507 | 506 | | |
508 | | - | |
509 | | - | |
| 507 | + | |
| 508 | + | |
510 | 509 | | |
511 | 510 | | |
512 | 511 | | |
| |||
0 commit comments