Skip to content

[BUG] Referer header is duplicated if set via setExtraHTTPHeaders #8999

@yury-s

Description

@yury-s

The following test fails in Chromium:

  const response = await page.goto(server.EMPTY_PAGE);
  expect(response.ok()).toBe(true);
  expect(response.request().headers()['referer']).toBe(server.EMPTY_PAGE);

The headers look like this:

[
  {
    "name": "Upgrade-Insecure-Requests",
    "value": "1"
  },
  {
    "name": "User-Agent",
    "value": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/96.0.4645.0 Safari/537.36"
  },
  {
    "name": "referer",
    "value": "http://localhost:8907/empty.html"
  },
  {
    "name": "Referer",
    "value": "http://localhost:8907/empty.html"
  }
]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions