Skip to content

Commit 2d51cdc

Browse files
Add header validation in update response algorithm
1 parent 0451167 commit 2d51cdc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

index.bs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4751,7 +4751,17 @@ To <dfn>update the response</dfn> given |session|, |command| and |command parame
47514751

47524752
1. For |header| in |command parameters|["<code>headers</code>"]:
47534753

4754-
1. Append [=deserialize header=] with |header| to |headers|.
4754+
1. Let |deserialized header| be [=deserialize header=] with |header|.
4755+
4756+
1. If |deserialized header|'s name does not match the [=field-name token=]
4757+
production, return [=error=] with [=error code=]
4758+
"<code>invalid argument</code>".
4759+
4760+
1. If |deserialized header|'s value does not match the [=header value=]
4761+
production, return [=error=] with [=error code=]
4762+
"<code>invalid argument</code>".
4763+
4764+
1. Append |deserialized header| to |headers|.
47554765

47564766
1. Set |response|'s [=response/header list=] to |headers|.
47574767

0 commit comments

Comments
 (0)