Skip to content

Runtime URIDecoder fails when parsing strings containing commas #278

@bfrearson

Description

@bfrearson

Commit hash: f0589f6

Context:
URIDecoder fails with error DecodingError: typeMismatch String - at : Cannot parse a value from a node with multiple values. (underlying error: <nil>) when trying to parse a value that contains a comma (e.g. no-cache, private in a header response).

I traced this back to URIParser which is splitting elements by commas.

Steps to reproduce:

  1. Attempt to decode a header response containing a comma as part of a request
  2. Request fails with DecodingError.typeMismatch

$ swift --version
Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100)
Target: arm64-apple-macosx13.0

Operating system: MacOS 13.4.1

Metadata

Metadata

Assignees

Labels

area/runtimeAffects: the runtime library.kind/enhancementImprovements to existing feature.size/SSmall task. (A couple of hours of work.)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions