I'm trying to alter the scheme of a request based on a custom header, thus:
```
cond %{READ_REQUEST_HDR_HOOK}
cond %{HEADER:X-ATS-Scheme} /http/
set-destination SCHEME %{CLIENT-HEADER:X-ATS-Scheme}
```
Unfortunately making a request:
```
$ http_proxy=http://traffic:8888 curl -i google.com -H 'X-ATS-Scheme: http'
```
Results in a `HTTP/1.1 400 Unsupported URL Scheme`. However changing the final
line to be:
```
set-destination QUERY %{HEADER:X-ATS-Scheme}
```
Happily rewrites the request to `http://google.com/?http`. And hardcoding the
scheme in the `set-destination`:
```
set-destination SCHEME http
```
Works as I'd hoped the dynamic version would. It seems like this should be
possible but is perhaps a bug in that it doesn't recognise when the dynamic
value is a valid scheme?
[ Full content available at:
https://github.com/apache/trafficserver/issues/4143 ]
This message was relayed via gitbox.apache.org for [email protected]