-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.http2Issues or PRs related to the http2 subsystem.Issues or PRs related to the http2 subsystem.
Description
in many cases changing "Hello, World!" to "Привет, мир!" lead to encoding hell
i guess it not good for newcomers :(
here http2 sample
==========================
const http2 = require('http2');
const fs = require('fs');
const server = http2.createSecureServer({
key: fs.readFileSync('localhost-privkey.pem'),
cert: fs.readFileSync('localhost-cert.pem')
});
server.on('error', (err) => console.error(err));
server.on('stream', (stream, headers) => {
// stream is a Duplex
stream.respond({
'content-type': 'text/html',
':status': 200
});
stream.end('<h1>Hello World (Привет, мир!)</h1>');
});
server.listen(8443);
==================
and how it look in browser -> Hello World (Привет, мир!)
:(
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.http2Issues or PRs related to the http2 subsystem.Issues or PRs related to the http2 subsystem.