Uh oh!
There was an error while loading. Please reload this page.
Compatibility fixes and test cases - #47
Conversation
mcollina
commented
Mar 23, 2017
wooow, thanks! Can you add a quick unit test for this? You can see an example in: https://github.com/nodejs/http2/blob/master/test/parallel/test-http2-create-client-session.js. I'm not 100% sure what was the problem in the first place, so the test would help as well. |
sebdeckers
commented
Mar 23, 2017
@mcollina The problem was that Actually I don't quite like the Will also work on a test case, sure. 😄 |
jasnell
commented
Mar 23, 2017
Why not pass the stream[kHeaders]=headers; |
sebdeckers
commented
Mar 23, 2017
@jasnell Yep, doing that now. Got confused because the property getters use get/has. Not sure why...? |
bf32825 to
6c3b5c9Comparesebdeckers
commented
Mar 24, 2017
PS: I see some unfinished provisions for implementing trailers on |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
sebdeckers
commented
Mar 26, 2017
@mcollina@jasnell I did some more work over the weekend to fix the compatibility layer. Please take a look and let me know what you think. My aim is to make it work similar to Node.js' http APIs. Also added more tests, as requested. Probably covers some of #42.
|
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
jasnell
commented
Mar 28, 2017
I'll take a more detailed look through in the morning. |
sebdeckers
commented
Mar 28, 2017
@mcollina Thank you for the feedback! 🙇 Have now separated the tests into separate files. Also linted the code. Notes to self: Run Eslint as per the Makefile: Quickly run the relevant test cases in bash: |
sebdeckers
commented
Mar 29, 2017
WIP:
|
mcollina
commented
Mar 29, 2017
can you please open a separate issue about cookies? |
In 3739695 I've implemented a minimalist API for push requests and push responses. server.on('request',(request,response)=>{constheaders={':path': '/foobar.txt','content-type': 'text/plain; charset=utf8'}constpushRequest=response.createPushRequest(headers)// createPushRequest returns an Http2PushRequest// Its argument is a plain Object with the PUSH_PROMISE headers (key/value).// Its only method is .push() which sends the PUSH_PROMISE frame,// and offers a callback to deal with the push response.pushRequest.push((error,pushResponse)=>{// pushResponse is just an Http2ServerResponse,// so it can do all the usual tricks...pushResponse.writeHead(200,headers)pushResponse.end('Hello, World!')})})@jasnell Would you be okay with this design replacing the one from the implementation notes example? It omits the
|
6f3335f to
3739695Compare@mcollina@jasnell Please review the C++ changes in 7f8a5eb#diff-20934af26ea78010b56b52f2fc636a18 This commit adds support for promised stream ID when receiving headers. The test case in However I'm seeing this error on exit: Any ideas? It's been 20 years since I touched C++. This has been another adventurous weekend. 😅 Update: Added a workaround inn 44cc0b8. By delaying the server's |
bd09d1c to
7f8a5ebComparesebdeckers
commented
Apr 4, 2017
jasnell
commented
Apr 19, 2017
This PR will need to be reworked. I've updated the master against the latest core and squashed the numerous http2 related commits to clean things up and get us ready for the next phase of cleanup and adding tests, etc. |
sebdeckers
commented
Apr 19, 2017
@jasnell Great! I'll get to work on it. 🕺 |
44cc0b8 to
430f9a6Comparesebdeckers
commented
Apr 20, 2017
@jasnell I have reworked the code according to the new client API. Also rebased/squashed and then cherry-picked the patch as one commit onto the updated master branch. Hope this is acceptable. 😫 Apologies for losing the individual commits — I struggle with advanced git-fu. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
430f9a6 to
cbc31b7Comparef46fbd4 to
e48514bCompare
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
e48514b to
8f07be5Comparesebdeckers
commented
May 8, 2017
Thanks for the thorough reviews, @jasnell. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
c6a2fe2 to
b251eb6Comparemcollina
commented
May 11, 2017
@sebdeckers sorry this conflicted with @yosuke-furukawa change. Would any of you fix things? |
b251eb6 to
6765d00Comparesebdeckers
commented
May 12, 2017
@yosuke-furukawa Does the change in 6765d00 work for you? (See also The The |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
PR-Url: #47 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
mcollina
commented
May 12, 2017
Landed as cee5479 |
jasnell
commented
May 12, 2017
@sebdeckers ... thank you for bearing with us on this. I know it took a while to get landed. |
sebdeckers
commented
May 12, 2017
PR-Url: #47 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-Url: #47 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-Url: nodejs#47 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-Url: nodejs#47 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-Url: nodejs#47 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Accessing the request's headers was returning
undefined. This is a quick fix that converts the headers object to a Map. Probably not the best for performance, but I wasn't sure if you'd rather rewrite all the property getters that expect.hasand.getmethods.