Skip to content

[OpenApi] How to have multiple Set-Cookie header as PHP does not allow multiple same array key ? #6650

Closed
@Crovitche-1623

Description

@Crovitche-1623

In RFC 6265, it's written that :

Origin servers SHOULD NOT fold multiple Set-Cookie header fields into a single header field.

I guess the only way of setting multiple cookie is separating them using a comma yet ?

How to reproduce

use ApiPlatform\OpenApi\Model\Operation;

$fooBarOperation = new Operation(
    // ...
    responses: [
        Response::HTTP_FOUND => [
             // ...
            'headers' => [
                'Set-Cookie' => [
                   // ...
                ],
                // Here I cannot declare another `Set-Cookie` array key
            ]
        ]
    ]
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions