Closed Rinzwind closed 1 year ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
80af760
) 48.67% compared to head (ed0006f
) 48.67%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This reminds me of https://github.com/SeasideSt/Seaside/issues/1211 which the exact same issue for responses... It does show how we need unit tests for these adaptors (https://github.com/SeasideSt/Seaside/issues/1213)
Reading issue #1211 makes me wonder: shouldn’t ZnZincServerAdaptor’s #requestHeadersFor:
return a WAHeaderFields instead of a Dictionary? Then the separate headers can be preserved. The methods in WARequest’s ‘accessing-headers’ protocol that answer a collection should then combine them.
This pull request fixes
#requestHeadersFor:
on ZnZincServerAdaptor to combine field values for repeated header field names.Section ‘5.2. Field Lines and Combined Field Value’ in RFC 9110 states:
See also section ‘6.3. Header Fields’.
Example:
Without this fix, the example returns
'application/json'
. With this fix, the example returns'application/xml,application/json'
.