Commit f87fe0d
authored
feat(auto): allow serving connection with upgrades after config (#113)
When using hyper_util::server::conn::auto::Builder, if one wants to set
http1 or http2 options one has to specialize the struct into
Http1Builder or Http2Builder with .http1()/.http2() methods.
However, once the struct has been specialized there is no way to go back
to the inner Builder to call serve_connection_with_upgrades(): one would
need to either add make inner public, add an inner() method to get it
back, or add a stub that just calls the method on inner like we have
with serve_connection().
Since we already had one for serve_connection(), add an indentical one for
serve_connection_with_upgrades()
Note that it does not make sense for serve_connection_with_upgrades() to
be called without the http feature (I think?), so it has only been implemented
for http1 if the http2 feature is set.1 parent 7bae87f commit f87fe0d
1 file changed
+44
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
668 | 689 | | |
669 | 690 | | |
670 | 691 | | |
| |||
824 | 845 | | |
825 | 846 | | |
826 | 847 | | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
827 | 868 | | |
828 | 869 | | |
829 | 870 | | |
| |||
971 | 1012 | | |
972 | 1013 | | |
973 | 1014 | | |
974 | | - | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
975 | 1018 | | |
976 | 1019 | | |
977 | 1020 | | |
| |||
0 commit comments