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

Issues while downloading static assets with SSL and HTTP/2 #524

Closed
alexandresoro opened this issue Mar 10, 2022 · 3 comments
Closed

Issues while downloading static assets with SSL and HTTP/2 #524

alexandresoro opened this issue Mar 10, 2022 · 3 comments

Comments

@alexandresoro
Copy link
Contributor

Type: Bug Report

Your Environment

  • Version used:
    • Version (stable release): master branch
    • Commit ID (development release) : f7d5fff
  • Environment name and version:
    • Node.js version node --version : 16.14.0, 17.5.0
    • npm version npm --version : 8+
    • Web browser name and version : any
  • Operating system and version: any
  • Torrent client and version: rtorrent

Summary

When launching flood with self-signed certificates and useSsl = true, assets have difficulty to download and return the following in the browser console:

Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR

The consequence is that pages are painful to load and not working as expected.

Issue does not seems to occur with Node <14

Expected Behavior

Web app should load and work similarly as when SSL is not activated

Current Behavior

Web app load breaks because static assets are not properly loaded.

Possible Solution

My understanding is that when SSL is active, the server relies on spdy library as web server.
I have checked and flood is using the latest released version.
The behavior is similar to the one described here: spdy-http2/node-spdy#380 so I suspect that there is no easy fix.

My suggestions would be to find another library as this one does not seem maintained anymore.

It also seems that HTTP/2 and SSL are supported natively by Node as per https://nodejs.org/docs/latest-v16.x/api/http2.html so another solution would be maybe to migrate to this.

Steps to Reproduce

  1. Launch flood with useSsl=true and provide valid certificates (I did it with self-signed)
  2. Log in with a valid account

Context

@alexandresoro
Copy link
Contributor Author

I may be missing something but I don’t see why we couldn’t migrate to the native node library. If this is OK, I could have a look and provide a MR.

@alexandresoro
Copy link
Contributor Author

On second thought, it seems not to be as trivial as I thought, and I saw that there was a WIP to migrate to fastify. It would make more sense to tackle this with this migration maybe…

jesec added a commit that referenced this issue May 11, 2022
HTTP/2 support can be restored after migration to fastify.

Bug: #524
jesec added a commit that referenced this issue May 11, 2022
HTTP/2 support can be restored after migration to fastify.

Bug: #524
@ChristopherTheBoss
Copy link

Glad this issue is resolved

@jesec jesec closed this as completed May 31, 2022
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

3 participants