jeudi 3 septembre 2020

HTTP protocol verification tooling

Is there a good tool that can be used to verify the HTTP responses from a web server are valid as per the various HTTP RFCs?

Context is - we have a bunch of spring-boot microservices deployed on k8s that use istio. Recently we upgraded istio, which caused all our APIs to die with a rather cryptic http 503 and this body:

upstream connect error or disconnect/reset before headers. reset reason: connection termination

The issue was triggered by this change in envoy that was enforcing http protocol violations. The root cause was actually one of our microservices was returning 2 Transfer-Encoding headers (it was calling an upstream service using feign and simply returning the upstream response as is, which would have been fine except that feign translates all headers into lower case, so we end up with 2 TE headers).

In order to trap errors like this, I'm looking for a library / tool / whatever that can make a HTTP request and assert the response is valid as per the HTTP RFCs, however I can't seem to find anything that is tailored to making assertions (rather than doing something like envoy, which is just blowing up when it finds something that is invalid)

Aucun commentaire:

Enregistrer un commentaire