Welcome
Sign in to start your session
Login
Login
[app info]
Brief app info: ENV: [DEV] commitId: 8664c22d0d4cea57a5b62b24463edbbb280637e6 branch: develop build date: 2026-08-18T11:33:27Z build version: 2026.08.06.1-SNAPSHOT commit message: #38169 Stop forwarding the caller's Content-Length to the fiat cashier Restores the fix reverted in 9d5418b2c. The revert was mine and it was wrong - the change does work, and here is the mechanism, read out of the bytecode this time instead of guessed. The proxy copies every header of the incoming request except an explicit deny list, and Content-Length was not on it. The body it forwards is not the body it received: a deposit gains providerAmount, providerCurrency, country, returnUrl and uniqueId and is re-serialised into canonical, key-sorted JSON, so it is longer than the original, while the inherited Content-Length still described the original. What I missed the first time is where that header lands. Spring 6 does skip Content-Length and Transfer-Encoding when copying HttpHeaders onto the Apache request - but only because the entity carries them, and the entity reads them straight back out of the same headers: HttpComponentsClientHttpRequest$BodyEntity.getContentLength() is a plain headers.getContentLength(), with isChunked() returning false. HttpClient 5 therefore writes a fixed-length body of exactly the stale number of bytes and cuts the rest. That matches the SGS facade's report precisely: parse errors at column 179 and 203, both inside CashierDepositRequest["payer"] and payer.lastName, because payer sits near the end of the deposit payload so the cut always lands in it. Cyrillic names make it worse - the UTF-8 body is longer in bytes than the original was in characters. This is a Boot 3 regression, not a long-standing bug. On Spring 5.3 the same class extended AbstractBufferingClientHttpRequest with executeInternal(HttpHeaders, byte[]) and built the entity from the actual byte array, so the stale header was inert. Spring 6.1 moved the request to streaming and made the entity trust the header. The proxy code itself predates the migration - it arrived with #37487. Dropping the header lets the entity report the real length. Transfer-Encoding goes with it: it describes the inbound framing and conflicts with that length. Both are already excluded on the response side of this proxy, so the request side now matches. Not built locally, as agreed. UPTIME: 0d 4h 59m 37s Git log: 9d541... | 2026-08-18T14:11:57+03:00 | ostas | Revert "#38169 Stop forwarding the caller's Con... 0a58d... | 2026-08-18T13:40:16+03:00 | ostas | #38169 Stop forwarding the caller's Content-Len... 80c8d... | 2026-08-18T13:14:12+03:00 | ostas | #38030 Review: Lombok accessors and builder-bas... 60b5d... | 2026-08-18T12:41:19+03:00 | ostas | #38030 Welcome Rescue Bonus: INSTANT_CLAIMABLE ... a6aea... | 2026-08-18T12:12:32+03:00 | Rodion | #38168 Player card: null-guard getPlayerCpfs - ... 765b9... | 2026-08-18T12:06:37+03:00 | Rodion | #38131 Fix the 2 deprecated-API stragglers the ... c1ea1... | 2026-08-18T11:04:50+03:00 | Rodion | #38131 Fix all 76 deprecated-API usages in new ... b3131... | 2026-08-17T20:03:20+03:00 | ostas | #38163 Record the mirror and theme skin on auth... c62f3... | 2026-08-17T19:41:19+03:00 | ostas | #38163 Add a mirror column to the authenticatio... 7f18f... | 2026-08-17T19:30:10+03:00 | ostas | #38163 Add a theme_skin column to the authentic...
copy to clipboard