-
Notifications
You must be signed in to change notification settings - Fork 195
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
http/2 Pushed javascript not loading #325
Comments
Having the same issue. It seems that JS files are corrupted. |
Were you able to find a workaround? |
Same issue with both JS and CSS. |
Send file content: // ...
vendorStream.on("error", (e: any) => console.error(e));
const stream = fs.createReadStream(`${somedir}/js/vendor.js`);
stream.pipe(vendorStream);
// vendorStream.end(); - fs stream end vendorStream
// ... or if content is Buffer/string: // ...
vendorStream.on("error", (e: any) => console.error(e));
vendorStream.end(vendorFileBuffer)
// ... PS. add some compression "negotiation" ( br, lzma, gzip, plain ) and serve best file prepared on build + headers... |
Looks like this repository is no longer maintained |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Node v8.2.1:
uname -a
: Linux a1da17d8416c 4.9.36-moby #1 SMP Fri Jul 14 17:47:34 UTC 2017 x86_64 Linux:https://stackoverflow.com/questions/45251150/http-2-pushed-javascript-not-loading
I'm building an HTTP/2 server with PUSH enabled on the spdy lib. Everything works perfectly without push enabled, but when I enable it the server is pushing empty frames.
spdy
.createServer(options, (req, res) => {
// TODO - figure out why the javascript doesnt load on the client
if (res.push) {
console.log("Pushing...");
// push vendor bundle
const bundleStream = res.push(
/js/client.js
, {status: 200,
method: "GET",
request: { accept: "/" },
response: { "content-type": "application/javascript" },
});
The output of nghttp -nv https:// is here: https://pastebin.com/Wuju0HR2
One of the commenters on stack overflow suggested I open up an issue here. Any help is much appreciated, thanks!
The text was updated successfully, but these errors were encountered: