Empty header value not sent in HTTP Request when using Cypress cy.intercept #30588
Labels
E2E
Issue related to end-to-end testing
stage: needs investigating
Someone from Cypress needs to look at this
Current behavior
I'm working on an end-to-end (E2E) test using Cypress to intercept an HTTP call with the following command:
In my Angular application, there’s a requirement to send a specific HTTP header with an empty value. For example:
Issue:
When I use Cypress to intercept the request, the header isn't sent. However, if I don't use
cy.intercept
, the header is sent as expected.In the dev-tool the header is shown but it's actually not sent.
Desired behavior
The headers should be sent correctly, this seems to be working when using cypress 6.0 that is the first version where intercept is introduced. We also tested the version 12.11 and the issue is present.
Test code to reproduce
Server
Html page
Cypress test
Cypress Version
13.15.0
Node version
v22.9.2
Operating System
Windows 11 Pro 23H2 build: 22631.4317
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: