httpx icon indicating copy to clipboard operation
httpx copied to clipboard

Fix `unquote` IndexError on empty string input

Open bysiber opened this issue 9 months ago • 0 comments

unquote('') in _utils.py raises IndexError because it accesses value[0] without checking string length first.

This can occur when parsing digest auth WWW-Authenticate headers containing parameters with empty unquoted values (e.g. realm= instead of realm="").

bysiber avatar Feb 20 '26 00:02 bysiber