Skip to content

RFC 9110 section 5.5: field-content doesn't match strings of length 2 #1119

@bdarnell

Description

@bdarnell
  field-value    = *field-content
  field-content  = field-vchar
                   [ 1*( SP / HTAB / field-vchar ) field-vchar ]

field-content matches a single field-vchar, and it matches a string of 3 or more characters which may contain internal whitespace as long as its first and last characters are field-vchars. However, it does not match a string of exactly two field-vchars. This looks like it is probably an error, although it has no practical effect because field-content is used only within field-value which can match two-character strings as two single-character field-contents. Removing the 1 would fix the error and allow two-character field-contents.

(discovered in tornadoweb/tornado#3481 (comment))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions