Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(conn/auto): allow serving connection with upgrade after config #113

Merged
merged 1 commit into from
Apr 15, 2024

Commits on Apr 5, 2024

  1. feat(conn/auto): allow serving connection with upgrade after config

    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.
    martinetd committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    6d258d7 View commit details
    Browse the repository at this point in the history