Subject: [httpwg/http-extensions] Size checks (#459)

From: HTTP issue updates <[email-masked]>
Date: Wed, 13 Dec 2017 17:47:34 -0800

Many of the algorithms in structured-headers are defined as taking input_string and returning a parsed X after modifying input_string to remove the X.  This is a pretty common way of building an inline parser.

Take label, which describes an initial step of:

> If input_string contains more than 256 characters, throw an error.

But a label can be followed by other things that will cause the overall string to exceed this length.  So this check is invalid.

I'd recommend moving the size checks into the algorithm body.  If X exceeds length maxlen(X), then throw as you are scrubbing through.

(from @martinthomson)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/httpwg/http-extensions/issues/459