GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: Improve doc for Http2 headers object by Flarna · Pull Request #21296 · nodejs/node

Conversation

@Flarna

@Flarna Flarna commented Jun 12, 2018

Copy link
Copy Markdown
Member

Add more details regarding processing and data type of incoming headers in Http2.

Checklist
  • documentation is changed or added
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Flarna
doc: Improve doc for Http2 headers object
972c2df
Add more details regarding processing and data type of incoming
headers in Http2.
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to Node.js documentation. http2 Issues and PRs related to the http2 subsystem. labels Jun 12, 2018
@Trott
Update http2.md
6129c5b
@Trott

Trott commented Jun 12, 2018

Copy link
Copy Markdown
Member

@nodejs/documentation

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apapirovski

apapirovski commented Jun 12, 2018

Copy link
Copy Markdown
Contributor

I'm not convinced most of this belongs in the http2 documentation since we're just following the spec (and it applies to http too). I am potentially in favour of documenting the type of the :status header.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Flarna

Flarna commented Jun 13, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

@apapirovski My start point in this was the :status header as I was surprised that it is no string. By looking closer into the code and http docs I found subtle differences therefore I thought it's better to write down all details - similar as in http (see https://nodejs.org/dist/latest/docs/api/http.html#http_message_headers).
I found following differences:

  • The list of headers where duplicates is discarded differs between http and http2 implementation
  • set-cookie is always an array for http, in http2 only if there are more values

I'm fine with removing some of the details, replace it by references to http or http2 spec (or even code).
Or maybe these differences are actually bugs?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Flarna Flarna mentioned this pull request Jun 13, 2018
[node] Correct type of incoming http2 ':status' header DefinitelyTyped/DefinitelyTyped#26512
Merged
7 of 9 tasks
vsemozhetbyt
vsemozhetbyt reviewed Jun 13, 2018
View reviewed changes
Comment thread doc/api/http2.md Outdated
discarded.
* `set-cookie` is a string if present once or an array in case duplicates
are present.
* `cookie` the values are joined together with '; '.

@vsemozhetbyt vsemozhetbyt Jun 13, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a colon after `cookie`?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Flarna Flarna Jun 14, 2018

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vsemozhetbyt reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
addaleax
addaleax approved these changes Jun 14, 2018
View reviewed changes
@Flarna

Flarna commented Jun 14, 2018

Copy link
Copy Markdown
Member Author

I was thinking once more regarding the difference in handling of set-cookie between http2 and http. This effects also the http2 compat API so it is not that compatible as it could be.

Till now this diff is not documented and http2 is experimental so this gap could be closed easily.

@nodejs/http2 any opinion in this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Flarna
fix review finding - add colon
3c93f26
@Flarna

Flarna commented Jun 14, 2018

Copy link
Copy Markdown
Member Author

@apapirovski What do think about following: Duplicates where only a single value is allowed (e.g. content-type, age,...) are discarded.?
Still clarifies that duplicates are discarded but without the burden to keep doc and code in sync.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell approved these changes Jun 14, 2018
View reviewed changes
ryzokuken
ryzokuken approved these changes Jun 15, 2018
View reviewed changes
@apapirovski

apapirovski commented Jun 15, 2018

Copy link
Copy Markdown
Contributor

@Flarna I would be fine with that but this has approvals as is so don't feel pressured to make the change. I think I'm in the minority in my opinion :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Flarna Flarna mentioned this pull request Jun 15, 2018
http2: pass incoming set-cookie header as array #21360
Closed
3 tasks done
@Flarna

Flarna commented Jun 15, 2018

Copy link
Copy Markdown
Member Author

@apapirovski I took a fast look into the history and it seems the headerlist is unchanged since ~9 month. Therefore I think it's ok to mention all headers in doc as the risk of getting out of sync is low.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Jun 24, 2018

Copy link
Copy Markdown
Contributor

Let's land this, say, tomorrow if there are no strong objections?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apapirovski apapirovski added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Jun 25, 2018
@apapirovski

apapirovski commented Jun 25, 2018

Copy link
Copy Markdown
Contributor

Landed in 8132413

vsemozhetbyt reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@apapirovski apapirovski closed this Jun 25, 2018
apapirovski pushed a commit that referenced this pull request Jun 25, 2018
@Flarna @apapirovski
doc: Improve doc for Http2 headers object
8132413
Add more details regarding processing and data type of incoming
headers in Http2.

PR-URL: #21296
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
@Flarna
Flarna deleted the doc_http2_incoming_headers branch June 25, 2018 07:18
targos pushed a commit that referenced this pull request Jun 25, 2018
@Flarna @targos
doc: Improve doc for Http2 headers object
4647f61
Add more details regarding processing and data type of incoming
headers in Http2.

PR-URL: #21296
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
@targos targos mentioned this pull request Jul 3, 2018
v10.6.0 proposal #21629
Merged
kjin pushed a commit to kjin/node that referenced this pull request Aug 23, 2018
@Flarna @kjin
doc: Improve doc for Http2 headers object
a73fcf0
Add more details regarding processing and data type of incoming
headers in Http2.

PR-URL: nodejs#21296
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
kjin pushed a commit to kjin/node that referenced this pull request Sep 25, 2018
@Flarna @kjin
doc: Improve doc for Http2 headers object
05a5a8f
Add more details regarding processing and data type of incoming
headers in Http2.

PR-URL: nodejs#21296
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
kjin pushed a commit to kjin/node that referenced this pull request Oct 16, 2018
@Flarna @kjin
doc: Improve doc for Http2 headers object
9e64f91
Add more details regarding processing and data type of incoming
headers in Http2.

PR-URL: nodejs#21296
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
BethGriggs pushed a commit that referenced this pull request Oct 17, 2018
@Flarna @BethGriggs
doc: Improve doc for Http2 headers object
4228141
Add more details regarding processing and data type of incoming
headers in Http2.

Backport-PR-URL: #22850
PR-URL: #21296
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
@BethGriggs BethGriggs mentioned this pull request Oct 30, 2018
v8.13.0 proposal #23974
Merged
@beevelop beevelop mentioned this pull request Nov 20, 2018
2018-11-20 Version 8.13.0 'Carbon' (LTS) @MylesBorins prepared by @BethGriggs beevelop/docker-android-nodejs#250
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@addaleax addaleax addaleax approved these changes
+2 more reviewers
@vsemozhetbyt vsemozhetbyt vsemozhetbyt left review comments
@ryzokuken ryzokuken ryzokuken approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. doc Issues and PRs related to Node.js documentation. http2 Issues and PRs related to the http2 subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@Flarna @Trott @apapirovski @vsemozhetbyt @jasnell @addaleax @ryzokuken @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.