Closed trowski closed 1 year ago
@trowski Doesn't parseFieldValueComponents
do already what you're trying to implement here?
In a manner of speaking, but it splits headers like 'permessage-deflate; client_max_window_bits=15; server_max_window_bits=15, some-other-extension'
into [['permessage-deflate; client_max_window_bits', '15; server_max_window_bits=15'], ['some-other-extension', '']]
, which isn't exactly ideal. This function would parse the header to simply ['permessage-deflate; client_max_window_bits=15; server_max_window_bits=15', 'some-other-extension']
.
Useful when all you care about is splitting on commas, not generating key-value pairs.
@kelunik Can you review the regex to make sure it makes sense.