edgexfoundry / edgex-taf

Apache License 2.0
11 stars 24 forks source link

TAF tests are not HTTP2 compatible - does case-sensitive header comparisons #757

Open bnevis-i opened 1 year ago

bnevis-i commented 1 year ago

🐞 Bug Report

Affected Services [REQUIRED]

Mostly all TAF HTTP tests

Is this a regression?

No

Description and Minimal Reproduction [REQUIRED]

According to https://blog.yaakov.online/http-2-header-casing/ the canonical headers for HTTP2 requests require HTTP headers to be lowercased. If return headers are lowercased, TAF tests will fail; most will fail checking 'Content-Type'

This behavior violates internet standards. Headers should be case-insensitive.

🔥 Exception or Error


''None' == 'applicaiton/json'' should be true

🌍 Your Environment

Deployment Environment: docker

EdgeX Version [REQUIRED]: minnesota (tip)

Anything else relevant? proxying requests in HTTP2 mode via haproxy

cherrycl commented 1 year ago

@bnevis-i For clarification, what is Content-Type return when using HTTP2? Is it None?

bnevis-i commented 1 year ago
content-type: application/json

but it works for

Content-Type: application/json
cherrycl commented 1 year ago

@bnevis-i Thanks. I will investigate it later.

cloudxxx8 commented 11 months ago

@cherrycl let's make all the http header check become case-insensitive