NeuraLegion/cypress-har-generator

IPv6 address square brackets removal not working as expected

Closed this issue · 0 comments

Description
The code snippet is intended to remove square brackets from an IPv6 address, but it does not work as expected.

Steps to reproduce

  1. Use the code snippet and pass an IPv6 address with square brackets, for example [2001:0db8:85a3:0000:0000:8a2e:0370:7334]
  2. Observe the value of the serverIPAddress field in the resulting HAR

Expected behavior
The EntryBuilder should remove the square brackets from the provided IPv6 address, returning 2001:0db8:85a3:0000:0000:8a2e:0370:7334

Actual behavior
The EntryBuilder does not remove the square brackets, and the value of the serverIPAddress field remains [2001:0db8:85a3:0000:0000:8a2e:0370:7334]

[1] https://tools.ietf.org/html/rfc2373#section-2.2