Repository: quarkusio/quarkus
Issue: Set-Cookie Header is Split when using OIDC together with AWS Lambda

### Describe the bug

I think I have a similar problem to #25580. I am trying to use the quarkus-oidc extension together with an AWS Lambda deployment using quarkus-amazon-lambda-http. When I remove the quarkus-amazon-lambda-http dependency from the project, everything works fine. However when it is included in the dependencies so the Mock Lambda Event Server is used in dev mode, the q_auth-Cookie breaks (in two parts).

This is part of the headers that Quarkus responds with:
```
< set-cookie: q_auth=6b6a7588-802f-49ea-a276-64e6bac263d1|/auth/authenticateAndRedirect?url=http%3A%2F%2Flocalhost%3A3000%2F; Max-Age=1800; Expires=Wed
< set-cookie: 22 Mar 2023 13:44:01 GMT; Path=/; HTTPOnly
```

As you can see, the comma that is used within the expiration value now is interpreted by the AWS Lambda Mock Server (and probably also the real one) as the separating character between two header values.


### Expected behavior

_No response_

### Actual behavior

_No response_

### How to Reproduce?

Steps to reproduce:
1. Go to https://code.quarkus.io, select "AWS Lambda HTTP" as well as "OpenID Connect" and download and extract the ZIP
2. Change maven.compiler.release to 11 (probably not necessary, I just did not have the required java version installed)
3. Add the following to the `application.properties`:
```
quarkus.oidc.application-type=web_app
# Enforce OIDC usage for all paths
quarkus.http.auth.permission.authenticated.paths=/*
quarkus.http.auth.permission.authenticated.policy=authenticated
```
4. Run `./mvnw quarkus:dev`
5. Execute `curl localhost:8080 -v`

Now you can see two set-cookie headers, of which at least the second one looks broken

### Output of `uname -a` or `ver`

_No response_

### Output of `java -version`

_No response_

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

_No response_

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

_No response_

### Additional information

_No response_

(edited to add missing reproduction step)

Changed files:
extensions/amazon-lambda-http/runtime/src/main/java/io/quarkus/amazon/lambda/http/LambdaHttpHandler.java
extensions/amazon-lambda-http/http-event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockHttpEventServer.java

diff --git a/extensions/amazon-lambda-http/http-event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockHttpEventServer.java b/extensions/amazon-lambda-http/http-event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockHttpEventServer.java
index e7b438422ea..69fe6e67955 100644
--- a/extensions/amazon-lambda-http/http-event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockHttpEventServer.java
+++ b/extensions/amazon-lambda-http/http-event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockHttpEventServer.java
@@ -128,6 +128,11 @@ public void processResponse(RoutingContext ctx, RoutingContext pending, Buffer b
                         }
                     }
                 }
+                if (res.getCookies() != null) {
+                    for (String cookie : res.getCookies()) {
+                        response.headers().add("set-cookie", cookie);
+                    }
+                }
                 response.setStatusCode(res.getStatusCode());
                 String body = res.getBody();
                 if (body != null) {
diff --git a/extensions/amazon-lambda-http/runtime/src/main/java/io/quarkus/amazon/lambda/http/LambdaHttpHandler.java b/extensions/amazon-lambda-http/runtime/src/main/java/io/quarkus/amazon/lambda/http/LambdaHttpHandler.java
index c7c9b7f1092..8b5c2654937 100644
--- a/extensions/amazon-lambda-http/runtime/src/main/java/io/quarkus/amazon/lambda/http/LambdaHttpHandler.java
+++ b/extensions/amazon-lambda-http/runtime/src/main/java/io/quarkus/amazon/lambda/http/LambdaHttpHandler.java
@@ -108,6 +108,11 @@ public void handleMessage(Object msg) {
                         if (allForName == null || allForName.isEmpty()) {
                             continue;
                         }
+                        // Handle cookies separately to preserve commas in the header values
+                        if ("set-cookie".equals(name)) {
+                            responseBuilder.setCookies(allForName);
+                            continue;
+                        }
                         final StringBuilder sb = new StringBuilder();
                         for (Iterator<String> valueIterator = allForName.iterator(); valueIterator.hasNext();) {
                             sb.append(valueIterator.next());