Commit 81bda76
Address code review: add fd validation, fix partial write handling, improve error messages
- Add in_fd validation in hio_sendfile() for both nio.c and overlapio.c
- Fix generic sendfile fallback to handle partial writes correctly
- Check sendfile_remain under mutex before unlocking in nio_write
- Improve SSL fallback with better EOF/error distinction
- Add fileno() validation in HTTP handler
- Improve Windows fallback with separate seek/read error handling
Co-authored-by: ithewei <26049660+ithewei@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ithewei/libhv/sessions/e59504ed-e745-410d-a8ab-e99946d80a3c1 parent bbbd87a commit 81bda76
3 files changed
+41
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
| 337 | + | |
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
343 | | - | |
344 | | - | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
345 | 354 | | |
346 | | - | |
| 355 | + | |
| 356 | + | |
347 | 357 | | |
348 | 358 | | |
349 | 359 | | |
| |||
480 | 490 | | |
481 | 491 | | |
482 | 492 | | |
| 493 | + | |
483 | 494 | | |
484 | 495 | | |
485 | 496 | | |
486 | 497 | | |
487 | | - | |
| 498 | + | |
488 | 499 | | |
489 | 500 | | |
490 | 501 | | |
| |||
679 | 690 | | |
680 | 691 | | |
681 | 692 | | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
682 | 697 | | |
683 | 698 | | |
684 | 699 | | |
| 700 | + | |
| 701 | + | |
685 | 702 | | |
686 | 703 | | |
687 | 704 | | |
688 | 705 | | |
689 | 706 | | |
690 | 707 | | |
691 | 708 | | |
692 | | - | |
693 | | - | |
| 709 | + | |
| 710 | + | |
694 | 711 | | |
695 | 712 | | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
696 | 717 | | |
697 | 718 | | |
698 | 719 | | |
| |||
721 | 742 | | |
722 | 743 | | |
723 | 744 | | |
| 745 | + | |
724 | 746 | | |
725 | 747 | | |
726 | | - | |
| 748 | + | |
727 | 749 | | |
728 | 750 | | |
729 | 751 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
| 392 | + | |
392 | 393 | | |
393 | | - | |
| 394 | + | |
| 395 | + | |
394 | 396 | | |
395 | 397 | | |
396 | 398 | | |
397 | 399 | | |
398 | 400 | | |
399 | | - | |
400 | | - | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
401 | 405 | | |
402 | 406 | | |
403 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
662 | | - | |
663 | | - | |
| 662 | + | |
| 663 | + | |
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
| |||
677 | 677 | | |
678 | 678 | | |
679 | 679 | | |
680 | | - | |
| 680 | + | |
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
| |||
0 commit comments