Unable to open websocket session over h2 (RFC 8441)
Categories
(Core :: Networking: WebSockets, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox110 | --- | fixed |
People
(Reporter: horia.muntean, Assigned: kershaw)
References
(Regressed 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
Steps to reproduce:
I have a server that is RFC 8441 compliant and offers only h2. The server is available in a git repo, in order to run it you have to follow these steps on a linux machine or wsl2 :
Install SDKMAN! from https://sdkman.io/install (this is needed only to install with ease other apps like java and maven; one can install them by other means)
sdk install java 17.0.3-tem
sdk install maven
git clone https://github.com/lachlan-roberts/websocket-http2-embedded-example
cd websocket-http2-embedded-example
Because FF has issues with self signed certificates and this repo uses one with CN=localhost it has to be replaced with another one otherwise FF won't load the main page - so issue another with a different CN:
openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 3650 -out certificate.pem
make sure you will have : Common Name (e.g. server FQDN or YOUR name) []:demo
openssl pkcs12 -inkey key.pem -in certificate.pem -export -out certificate.p12
use 'storepwd' when Enter Import Password: is prompted
cp certificate.p12 src/main/resources/keystore.p12
Add in /etc/hosts an entry for 'demo' and the local IP.
Now run the server
mvn compile exec:java -Dexec.mainClass="org.example.Main"
Open https://demo:8443 in FF and fill the URI field from the main page with wss://demo:8443 and press Join button (this will try to open a wss session)
Actual results:
The websocket session does not open, see attached screen shots (ff-wss.png). In the console there is the following error: Firefox can’t establish a connection to the server at wss://demo:8443/
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0
Expected results:
The websocket session should open as it does when doing the same with Chrome 102.0.5005.115
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36)
Comment 1•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Networking: WebSockets' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Reporter | ||
Comment 2•2 years ago
|
||
This can also be tested with a public server at https://libwebsockets.org/testserver/
WSS/H2 badge does no show if opened with FF.
Assignee | ||
Comment 4•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 5•2 years ago
|
||
Depends on D165274
Comment 7•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2bfa261943a5
https://hg.mozilla.org/mozilla-central/rev/6c7e9cf2f986
Updated•2 years ago
|
Description
•