http2-push-example icon indicating copy to clipboard operation
http2-push-example copied to clipboard

HTTP/2 Push example

Results 6 http2-push-example issues
Sort by recently updated
recently updated
newest added

``` $ node -v v17.2.0 $ npm -v 8.5.1 $ npm start > [email protected] start > node --expose-http2 index.js node: bad option: --expose-http2 ```

I was getting the following error: ``` ...\http2-push-example\src\server.js:28 pushStream.respondWithFD(file.fileDescriptor, file.headers) ^ TypeError: Cannot read property 'respondWithFD' of null at stream.pushStream (...\http2-push-example\src\server.js:28:16) at process._tickCallback (internal/process/next_tick.js:63:19) ``` [Apparently](https://github.com/nodejs/node/issues/18490) the [HTTP2 API](https://github.com/nodejs/node/pull/17406#issuecomment-356661798) of...

stream.pushStream({ ':path': path }, (err,pushStream) => { }) 先err再pushStream

Simple fix, although trivially also raises the required version of Node.

helper.js node v8.10 ![image](https://user-images.githubusercontent.com/20693737/41190110-66b8ce4c-6c0b-11e8-81b0-fb78f063357c.png)

I found in `helper.js`, we open the file to get the `fileDescriptor` using `fs.openSync(filePath, 'r')`. But do we need to close it when the server is closed? the code in...