adambagniewski commented on issue #26185:
URL: https://github.com/apache/pulsar/issues/26185#issuecomment-4959805202
A few additional findings from our investigation that help narrow this down
and confirm the root cause is broker-side (not the NAR):
**1. Excluding Jackson from the interceptor NAR does NOT help.**
We rebuilt our interceptor NAR with `jackson-databind`, `jackson-core` and
`jackson-annotations` excluded from the bundle (so the interceptor uses the
broker-provided Jackson only). The 400 still reproduces identically. This rules
out the "NAR ships a conflicting Jackson" hypothesis and points squarely at the
broker-side `PreInterceptFilter` / `RequestWrapper` body handling.
**2. Deterministic isolation on a live broker (interceptor on vs off).**
Same broker, same request, single variable flipped:
- `brokerInterceptors=[pulsar-interceptor]` → admin POST/PUT returns **HTTP
400** `FAIL_ON_TRAILING_TOKENS`
- `brokerInterceptors=[]` (broker recreated) → same request returns **204**
So the filter chain installed when *any* interceptor is present is both
necessary and sufficient to trigger it — consistent with `PreInterceptFilter`
being registered unconditionally on `getBrokerInterceptor() != null` in
`WebService`.
**3. Not specific to one endpoint — every admin POST/PUT with a JSON body
fails.**
Reproduced on multiple endpoints, all with the same
`FAIL_ON_TRAILING_TOKENS` error, only differing by the bound type:
- `POST .../namespaces/{tenant}/{ns}/retention` → `RetentionPolicies`
- `PUT .../namespaces/{tenant}/{ns}` → `Policies`
- `POST .../bookies/racks-info/{bookie}?group=...` → `BookieInfo`
GET requests (no body) are unaffected. This confirms it's the buffered
request-body replay in `RequestWrapper`, independent of the specific resource.
--
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]