Skip to content

How to use http/1.1 protocol #50

Closed

Description

@cyal1

How to use http/1.1 protocol

Activity

  1. added
    Type: QuestionA query or seeking clarification on parts of the spec. Probably doesn't need the attention of all.
    on Sep 13, 2021
  2. Mzack9999 commented on Sep 13, 2021

    @Mzack9999
    Member

    @cyal1 Thanks for opening this issue. The HTTP protocol is something negotiated by the client and not enforced by the server. To force it, you should explicitly set your client to use HTTP 1.X, and, I suppose, it's also necessary to skip alpn/npn negotiation. For example, with curl, the following command performs the request with HTTP 1.1:

    curl https://localhost:8000 -v --http1.1 -k
    
  3. cyal1 commented on Sep 18, 2021

    @cyal1
    Author

    hello, I want the service only support http/1.1

  4. Mzack9999 commented on Oct 15, 2021

    @Mzack9999
    Member

    net/http supports natively http/2 upgrade upon client request. I guess in this case we would need to add a CLI flag to specify explicitly which protocol to use as it needs to be set through TLSNextProto in the http server settings:

    srv := &http.Server{
        Addr:         "127.0.0.1:8000",
        TLSNextProto: make(map[string]func(*http.Server, *tls.Conn, http.Handler)),
    }
  5. linked a pull request that will close this issueAdding support for http1 mode only #56on Oct 16, 2021
  6. added
    Type: EnhancementMost issues will probably ask for additions or changes.
    Status: In ProgressThis issue is being worked on, and has someone assigned.
    Status: Review NeededThe issue has a PR attached to it which needs to be reviewed
    and removed
    Type: QuestionA query or seeking clarification on parts of the spec. Probably doesn't need the attention of all.
    Status: In ProgressThis issue is being worked on, and has someone assigned.
    on Oct 26, 2021
  7. added
    Status: CompletedNothing further to be done with this issue. Awaiting to be closed.
    and removed
    Status: Review NeededThe issue has a PR attached to it which needs to be reviewed
    on Oct 30, 2021
  8. linked a pull request that will close this issue0.0.5 Release #74on Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Status: CompletedNothing further to be done with this issue. Awaiting to be closed.Type: EnhancementMost issues will probably ask for additions or changes.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions