You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
h1: answer templates compare the Connection value as a whole #1702
Found during #1687 and #1696. Measured on main at 9e55ad621db2a4f738f7a0ec54401f7f8e3e8291.
#1683/#1687 made Connection handling token-based (has_connection_option, case-insensitive, comma-list aware, across all lines) on both request and response paths. The answer-template path still compares the whole value: lib/src/protocol/kawa_h1/answers.rs (compare_no_case(val_data, b"close") around line 239), used to decide whether a parsed template carries Connection: close.
Effect: an operator-written answer template with Connection: keep-alive, close or Connection: close, x-custom is not recognised as closing, so the session may keep the client connection open after an answer whose framing relies on close. All 15 built-in templates use a lone Connection: close, so the default configuration is unaffected.
Fix: reuse has_connection_option for this check; add a test with a list-valued Connection in a custom template.
Activity
fix(h1): read an answer template's Connection value as an option list (…