scheme field should be case-insensitive for the sake of robustness
#28,594 opened on 2023年7月25日
Repository metrics
- Stars
- (27,997 stars)
- PR merge metrics
- (平均マージ 8d) (30d で 378 merged PRs)
説明
Title: scheme field should be case-insensitive for the sake of robustness
Description:
When redirecting the request for envoyproxy.io to the local envoy 8000 service via the curl -x parameter, a 400 response error will occur. The reasons for the error are as follows
$curl envoyproxy.io -x 127.0.0.1:8000 -v
* About to connect() to proxy 127.0.0.1 port 8000 (#0)
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8000 (#0)
> GET HTTP://envoyproxy.io/ HTTP/1.1
> User-Agent: curl/7.29.0
> Host: envoyproxy.io
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 400 Bad Request
< content-length: 11
< content-type: text/plain
< date: Tue, 25 Jul 2023 04:08:33 GMT
< server: envoy
< connection: close
<
* Closing connection 0
Bad Request
Reference rfc3986 for the definition specification of scheme: Although schemes are case-insensitive, the canonical form is lowercase and documents that specify schemes must do so with lowercase letters. An implementation should accept uppercase letters as equivalent to lowercase in scheme names (e.g., allow "HTTP" as well as "http") for the sake of robustness but should only produce lowercase scheme names for consistency.
So envoy implementation of scheme field should be case-insensitive for the sake of robustness.