zeroflag opened a new pull request, #798:
URL: https://github.com/apache/knox/pull/798
## What changes were proposed in this pull request?
Incoming Headers are not going through when using OPTIONS type HTTP requests.
## How was this patch tested?
Sandbox topology
```xml
<service>
<role>HIVE</role>
<url>http://localhost:1701/headers</url>
<param>
<name>replayBufferSize</name>
<value>8</value>
</param>
</service>
```
Test HTTP server that logs out the received headers:
```smalltalk
Teapot on
OPTIONS: '/headers' -> [:req |
req headersDo: [:n :v | Transcript show: ('Received: ', n, '=', v); cr
]. 'OK' ];
start.
```
$ curl -X OPTIONS -u admin:admin-password -H 'My-Header: My-Value' -vk
https://localhost:8443/gateway/sandbox/hive
```
Transcript content:
```
Received: X-Forwarded-Proto=https
Received: X-Forwarded-Port=8443
Received: X-Forwarded-Host=localhost:8443
Received: X-Forwarded-Server=localhost
Received: X-Forwarded-Context=/gateway/sandbox
Received: Accept=*/*
Received: User-Agent=curl/7.64.1
Received: My-Header=My-Value
Received: Authorization=Basic YWRtaW46Kg==
Received: Host=localhost:1701
Received: Connection=Keep-Alive
Received: X-Zinc-Remote-Address=127.0.0.1
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]