I'm trying to server push a 2MB jpg file, and the push error handler gets this with Firefox:
{ [Error: Received rst: 2] code: 'RST_STREAM', status: 2 }[Error: Write after end!]
And this with Chrome:
{ [Error: Received rst: 1] code: 'RST_STREAM', status: 1 }[Error: Write after end!]
The file is definitely not cached.
Smaller files all work OK.
What am I doing wrong, or does push not support anything that doesn't fit in one buffer?
Also, this is how I push:
function pushIt(file) {
var s = res.push('/static/' + file, mime(file), pushHandler);
var bufferStream = new stream.Transform();
bufferStream.push(push_cache[file]);
bufferStream.end();
bufferStream.pipe(s);
}
I'm afraid that this is just how the browsers interpret PUSH streams. For them they are a prefetch data, and they prefer to fetch big files by themselves.
I don't think that this is a node-spdy bug, sorry.
I'm trying to server push a 2MB jpg file, and the push error handler gets this with Firefox:
{ [Error: Received rst: 2] code: 'RST_STREAM', status: 2 }
[Error: Write after end!]
And this with Chrome:{ [Error: Received rst: 1] code: 'RST_STREAM', status: 1 }
[Error: Write after end!]
The file is definitely not cached. Smaller files all work OK. What am I doing wrong, or does push not support anything that doesn't fit in one buffer?Also, this is how I push:
push_cache[file]
is a Buffer object.