envoyproxy / envoyproxy/envoy

HPE_INVALID_URL with non-urlencoded args

Open
#12,073 6 comments 2 reactions 0 assignees View on GitHub
area/http help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 22h
Merged PRs (30d)
430

Description

I have an envoy as a http1.1 proxy with default config and when I try to access some non-unicode nonencoded params in uri - I have error 400 with HPE_INVALID_URL in debug log without any information. `normalize_path` is off by default and there is not a path - it is query string, so this behaviour looks strange.

*Repro steps*:

```static_resources:
listeners:
- name: local_listener
address:
socket_address:
protocol: TCP
address: ::1
port_value: 12701
drain_type: MODIFY_ONLY
traffic_direction: OUTBOUND
filter_chains:
- filters:
- name: envoy.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
stat_prefix: local_balancer
normalize_path: false
route_config:
name: local_balancer_route
request_headers_to_add:
- header:
key: "X-Local-Proxy"
value: "%HOSTNAME%"
virtual_hosts:
- name: localhost
domains: ["localhost:12701"]
routes:
- match: { prefix: "/" }
route:
cluster: example_cluster
timeout: 600s
retry_policy:
retry_on: gateway-error
num_retries: 5

cluster config omitted - default 80 port.
```

Request: `curl 'http://localhost:12701/test?arg=Юникодные символы'`

Expect: Correct proxy pass to backend
Answer: 400 Bad Request

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.