Skip to content

Commit ca3923f

Browse files
committed
Check last character too
1 parent 590bd50 commit ca3923f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

aiohttp/web_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def forwarded(self) -> tuple[Mapping[str, str], ...]:
318318
match = _FORWARDED_PAIR_RE.match(field_value, pos)
319319
if match is not None: # got a valid forwarded-pair
320320
name, value, port = match.groups()
321-
if value[0] == '"':
321+
if value[0] == '"' and value[-1] == '"':
322322
value = value[1:-1]
323323
if port:
324324
value += port

0 commit comments

Comments
 (0)