eclipse-ee4j / jersey

Eclipse Jersey Project - Read our Wiki:
https://github.com/eclipse-ee4j/jersey/wiki
Other
690 stars 351 forks source link

jersey-netty-connector - Content-Length and Host header should not be set if they are present in the jersey request #5271

Open sxsubram opened 1 year ago

sxsubram commented 1 year ago

When using HTTP Authorization header of type Signature, the headers used to compute the signature is set in the headers map that is part of the jersey request. jersey-netty-connector should not be setting the headers that is already present in the jersey request.

Example - Authorization: Signature keyId="ocid1*",algorithm="rsa-sha256",headers="date (request-target) host content-length content-type x-content-sha256",signature="EfdJhBrpwJW8M***",x-content-sha256: 47DEQpj8HBSa+***

In this case Host header should not be added and Content-Length header should be preserved

jansupol commented 1 year ago

What is your use-case for which you set different content-length than what Jersey sets?