8000 HTTP/1.1 `field-name` rule too restrictive · Issue #350 · GaloisInc/daedalus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

HTTP/1.1 field-name rule too restrictive #350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kenballus opened this issue Oct 12, 2023 · 0 comments
Open

HTTP/1.1 field-name rule too restrictive #350

kenballus opened this issue Oct 12, 2023 · 0 comments
6F01

Comments

@kenballus
Copy link

RFC 9110 defines field-name with the following productions:

field-name = token
token = 1*tchar
tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA

We HTTP-1.1.ddl defines it like this:

def Field_name =
  block
    -- Field names must start with an ASCII letter and can include
    -- letters, digits, or '-' characters.
    let head = $alpha
    let tail = Many $[ $alpha | '-' | $digit ]
    let result = concat [[head], tail]
    ^ map (c in result)
        toLower c

To match the RFC, I think it should look more like this:

def Field_name =
  block
    let result = Many $[ '!' | '#' | '$' | '%' | '&' | "'" | '*' | '+' | '-' | '.' | '^' | '_' | '`' | '|' | '~' | $digit | $alpha ]
    ^ map (c in result)
        toLower c

Just wanted to submit an issue before PR, in case there's a place in the spec that I missed that specifies the restrictions implemented in HTTP-1.1.ddl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0