Skip to content

HTTPFields raw subscript behavior question #26

@li-bei

Description

@li-bei

In current implementation (0.2.1), after you set a combined field value via the plain subscript method, you will get the combined value from raw subscript method too:

var fields = HTTPFields()
fields[.acceptLanguage] = "en-US, zh-Hans-CN"
print(fields[.acceptLanguage]!) // en-US, zh-Hans-CN
print(fields[raw: .acceptLanguage]) // ["en-US, zh-Hans-CN"]

But I expect the raw subscript method will return ["en-US", "zh-Hans-CN"] in the above example. Is current behavior expected? Or it is a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/supportAdopter support requests.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions