Skip to content

Test for HTTP spec conformance during CI #3083

@kyri-petrou

Description

@kyri-petrou

I think this is a bit of an ambitious request, but hopefully it's something that we can achieve.

The HTTP spec contains a lot of "gotchas" and unless a contributor knows the HTTP spec inside-out (which is almost impossible), we're bound to make a change at some point that violates the spec. A good example of this is #3080, where a previous fix to an issue that allowed users to provide an invalid content-length (which is against the spec) seems to have broken HEAD requests, where the content-length should match the length of the content as if the request is a GET request.

In order to guard against this, we need an HTTP Spec conformance test suite that runs during CI. A potentially good starting point is this repo, but there are probably other / better tools for it (haven't looked too extensively). I'm sure that adding such a suite will very likely unearth violations, so we should probably do it in 2-3 steps:

  1. Add a CI workflow that tests a server for HTTP spec conformance.
  2. Fix any failing checks that are required by the spec.
  3. Fix as many recommendations as possible.

@jdegoes @987Nabil what are your thoughts on having this? Is this something that's too ambitious or do you think it might be doable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions