Skip to content

Request headers should be also represented as an array #62

Description

@karol-maciaszek

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions