Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the server behavior for deserializing httpPrefixHeaders when multiple values appear for the same header name? #1069

Open
david-perez opened this issue Jan 31, 2022 · 0 comments
Labels
documentation This is a problem with documentation. guidance Question that needs advice or information. protocol-test New protocol tests are needed server This issue involves the specification for server software.

Comments

@david-perez
Copy link
Contributor

david-perez commented Jan 31, 2022

The httpPrefixHeaders trait can be applied to structure members that target a map of string.

What map should a server implementation deserialize to when encountering multiple values for the same header name? The docs don't specify a behavior.

There are also no protocol tests.

Example (taken from here):

{
    id: "RestJsonHttpPrefixHeadersArePresent",
    documentation: "Adds headers by prefix",
    protocol: restJson1,
    method: "GET",
    uri: "/HttpPrefixHeaders",
    body: "",
    headers: {
        "X-Foo": "Foo",
        "X-Foo-Abc": "Abc value",
        "X-Foo-Abc": "another value",
        "X-Foo-Def": "Def value",
    },
    params: {
        foo: "Foo",
        fooMap: {
            Abc: "Abc value", // <------ Or `another value` ?
            Def: "Def value",
        }
    }
},

Should we accept the request and pick the first or the last value? Should we reject the request?

@david-perez david-perez changed the title What is the server behavior for deserializing httpPrefixHeaders when multiple values appear for the same key? What is the server behavior for deserializing httpPrefixHeaders when multiple values appear for the same header name? Jan 31, 2022
@mtdowling mtdowling added the guidance Question that needs advice or information. label Dec 15, 2022
@kstich kstich added documentation This is a problem with documentation. protocol-test New protocol tests are needed labels Aug 15, 2023
@kstich kstich added the server This issue involves the specification for server software. label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. guidance Question that needs advice or information. protocol-test New protocol tests are needed server This issue involves the specification for server software.
Projects
None yet
Development

No branches or pull requests

3 participants