Open mattoni opened 7 years ago
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
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!