Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request headers should be also represented as an array #62

Open
3 tasks
karol-maciaszek opened this issue Mar 11, 2020 · 0 comments
Open
3 tasks

Request headers should be also represented as an array #62

karol-maciaszek opened this issue Mar 11, 2020 · 0 comments

Comments

@karol-maciaszek
Copy link
Contributor

karol-maciaszek commented Mar 11, 2020

Chore summary
Currently the type for IHttpRequest.headers is just string. This is good because even if a header of the particular name appears several times inside the request, they will be concatenated using , (see https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2).

However, this is not true for Set-Cookie which is not concatenated due to its internal format. Specifically, the expires can contain , already.
Example: Set-Cookie: id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT

The goal of this task is to make headers a string | string[] and update all the dependent code.

Tasks

  • Find and asses dependencies
  • Update type in http.ts
  • Update dependent projects (might require separate tasks if too complex)

Additional context
Based on discussion here: https://github.com/stoplightio/platform-internal/pull/1279/files#r391020707

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant