mnot / rfc-http-validate

Validate HTTP messages in XML2RFC documents
MIT License
4 stars 3 forks source link

Can this tool support HTTP/2 style diagrams? #4

Open LPardue opened 2 years ago

LPardue commented 2 years ago

In the priorities draft, we decided to use the HTTP/2 style of diagram because the text is oriented to H2 and H3 users. Using HTTP/1.1 style would be weird.

If I change our examples from example to http-message then the linter throws up these problems

Input

~~~ http-message
:method = GET
:scheme = https
:authority = example.net
:path = /menu.png
priority = u=5, i
~~~

and the origin responds with

~~~ http-message
:status = 200
content-type = image/png
priority = u=1
~~~

Output

  skipping section example
  skipping section example
  skipping section abnf
  skipping section drawing
  skipping section drawing
  draft-ietf-httpbis-priority-08.xml:582: validating request line :method = GET
  ERROR at draft-ietf-httpbis-priority-08.xml:582: Method ':method' not recognised
  ERROR at draft-ietf-httpbis-priority-08.xml:582: Request line ':method = GET' doesn't end with 'HTTP/1.1'
  ERROR at draft-ietf-httpbis-priority-08.xml:582: Non-field line 'priority = u=5, i' in content
  draft-ietf-httpbis-priority-08.xml:588: validating request line :status = 200
  ERROR at draft-ietf-httpbis-priority-08.xml:588: Method ':status' not recognised
  ERROR at draft-ietf-httpbis-priority-08.xml:588: Request line ':status = 200' doesn't end with 'HTTP/1.1'
  ERROR at draft-ietf-httpbis-priority-08.xml:588: Non-field line 'content-type = image/png' in content
mnot commented 2 years ago

It could, with an appropriate PR :)

LPardue commented 2 years ago

Ack, sounds like my hackathon week has begun