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

WS connections dropped after enabling HTTP/2 #17

Open
jscarty opened this issue Oct 22, 2018 · 0 comments
Open

WS connections dropped after enabling HTTP/2 #17

jscarty opened this issue Oct 22, 2018 · 0 comments

Comments

@jscarty
Copy link

jscarty commented Oct 22, 2018

On a cro server I have set up. After enabling https in Cro::HTTP::Server. Chrome proves a failed: Connection closed before receiving a handshake response error from the dev console and firefox returns a vaguer _Firefox can’t establish a connection to the server at [websocket_address]/ws-connect. error from its dev console. I am sorry for the vague code example. I've found the below does not work

my Cro::Service $http = Cro::HTTP::Server.new(
    http => <1.1 2>,
    host => %*ENV<JSCARTY_HOST> ||
        die("Missing JSCARTY_HOST in environment"),
    port => %*ENV<JSCARTY_PORT> ||
        die("Missing JSCARTY_PORT in environment"),
    tls  => %(
        private-key-file => %*ENV<JSCARTY_TLS_KEY> ||
            %?RESOURCES<fake-tls/server-key.pem>,
        certificate-file => %*ENV<JSCARTY_TLS_CERT> ||
            %?RESOURCES<fake-tls/server-crt.pem>
    ),
    :$application,
    after => [
        Cro::HTTP::Log::File.new(logs => $*OUT, errors => $*ERR)
    ]
);

while the below does

my Cro::Service $http = Cro::HTTP::Server.new(
    http => <1.1>,
    host => %*ENV<JSCARTY_HOST> ||
        die("Missing JSCARTY_HOST in environment"),
    port => %*ENV<JSCARTY_PORT> ||
        die("Missing JSCARTY_PORT in environment"),
    :$application,
    after => [
        Cro::HTTP::Log::File.new(logs => $*OUT, errors => $*ERR)
    ]
);
@Altai-man Altai-man changed the title WS connections dropped after enabling hhps (2) WS connections dropped after enabling HTTP/2 Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant