spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

FormFilter does not adjust Content-Length header

Open pputerla opened this issue 2 months ago • 0 comments

Describe the bug FormFilter can recreate produce body bigger than original but Content-Length header is not changed. Any other processing may fail because it may read body up to Content-Length trimming it in the process.

Sample Example is exlamation mark character.

When sending x-www-form-urlencoded form a browser it will not encode "!" into %21. It will count this character as 1 byte

However FormFilter will encode the character here increasing the output by 2 bytes

pputerla avatar Nov 07 '25 13:11 pputerla