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

Can't use http2 with Karma #2424

Closed
itslenny opened this issue Oct 28, 2016 · 5 comments · Fixed by karronoli/redpen#10
Closed

Can't use http2 with Karma #2424

itslenny opened this issue Oct 28, 2016 · 5 comments · Fixed by karronoli/redpen#10

Comments

@itslenny
Copy link
Contributor

Expected behaviour

Uses http 2

Actual behaviour

Uses http 1.1

Is there any way to use http2 in with Karma server?

I'm running tests from gulp using:

  new karma.Server({ ... });

and my site is heavily utilizing http2's concurrent connections (no bundling). It's working great in production and we're living the dream, but the tests are running horribly slow because the karma server doesn't have http2. Is there anyway to either turn on http2... or provide node's http2 server or possibly even just tell karma to use another http server that does support http2?

@dignifiedquire
Copy link
Member

To make this possible we would have to upgrade the current http server to be http2 compatible. Do you know of any good nodejs http2 severs that also work well for http1?

@Florian-R
Copy link

@dignifiedquire It should be possible to add support for this with node-spdy, but this seems an heavy solution.

Does a config to provide a custom server instance could be an alternative?

@dignifiedquire
Copy link
Member

@Florian-R I think it would be nice if users could just enable http2 via a config without thinking about it. Maybe making node-spdy not a dependency but just log an error if http2 is enabled and it is not installed prompting the user to install it. That way there is no impact for users not needing it, and if people want to use it, it's just a config + an install away.

@itslenny
Copy link
Contributor Author

Another option is node-http2 which is supposed to (mostly) mirror the standard http module so it might be a really easy integration. I don't know much about node-http2 vs node-spdy, but they both look like viable options.

itslenny pushed a commit to itslenny/karma that referenced this issue Nov 10, 2016
allow setting an external module for use by KarmaServer

Closes karma-runner#2424
itslenny pushed a commit to itslenny/karma that referenced this issue Nov 10, 2016
allow setting an external module for use by KarmaServer

Closes karma-runner#2424
itslenny added a commit to itslenny/karma that referenced this issue Nov 10, 2016
allow setting an external module for use by KarmaServer

Closes karma-runner#2424
@jfstephe
Copy link

jfstephe commented Jan 8, 2020

@itslenny - did you actually get http2 working? I've overridden the http module but even after sacrificing a goat ( 🐐 🔪 ) it doesn't work. I'm having proxy header issues.

Any examples you can point me to?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants