Skip to content

The type of set-cookies obtained by heaers is inconsistent with the actual type? #1892

@JQiue

Description

@JQiue

Bug Description

headers["set-cookie"]returned is a string, type declaration is a string [] | undefined?

 const { headers } = await request(index_url);
 console.log(headers);
/* {
  date: 'Sat, 28 Jan 2023 09:43:48 GMT',
  'content-type': 'text/html',
  'content-length': '2920',
  connection: 'keep-alive',
  vary: 'Accept-Encoding',
  'last-modified': 'Sat, 17 Sep 2022 08:52:52 GMT',
  'accept-ranges': 'bytes',
  etag: '"1d8ca72dec58168"',
  'set-cookie': 'SERVERID=f7a91655448e700d4049e6f0ca2b6b52|1674899028|1674899028;Path=/'
} */
console.log(headers["set-cookie"]);
/*
SERVERID=f7a91655448e700d4049e6f0ca2b6b52|1674899028|1674899028;Path=/
*/

Reproducible By

Expected Behavior

Logs & Screenshots

Environment

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions