From ed0006f02e073aaaa4cbdc4b7e6aacdb8168c691 Mon Sep 17 00:00:00 2001 From: Kris <1611248+Rinzwind@users.noreply.github.com> Date: Thu, 2 Nov 2023 16:10:42 +0100 Subject: [PATCH] Fixed #requestHeadersFor: on ZnZincServerAdaptor to combine field values for repeated field names in the header section (see: https://www.rfc-editor.org/rfc/rfc9110.html#section-5.2). --- .../instance/requestHeadersFor..st | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/repository/Zinc-Seaside.package/ZnZincServerAdaptor.class/instance/requestHeadersFor..st b/repository/Zinc-Seaside.package/ZnZincServerAdaptor.class/instance/requestHeadersFor..st index c174a0f70..b667a66d9 100644 --- a/repository/Zinc-Seaside.package/ZnZincServerAdaptor.class/instance/requestHeadersFor..st +++ b/repository/Zinc-Seaside.package/ZnZincServerAdaptor.class/instance/requestHeadersFor..st @@ -3,5 +3,10 @@ requestHeadersFor: aZincRequest | fields | fields := Dictionary new. aZincRequest headersDo: [ :key :value | - fields at: key asLowercase put: value ]. + | keyLowercase combinedValue | + keyLowercase := key asLowercase. + combinedValue := fields at: keyLowercase + ifPresent: [ :presentValue | presentValue , ',' , value ] + ifAbsent: [ value ]. + fields at: keyLowercase put: combinedValue ]. ^ fields \ No newline at end of file