MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby. MockServer also includes a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding).
Describe the feature request
Increase max mock response size when mockserver is used with Jackson 2.15.
What you are trying to do
I'm trying to use mockserver inside a project which uses Jackson 2.15.2 dependency. This overrides Jackson version 2.14.2 from the mockserver project.
Implementation of jackson-core#863 sets upper limit on maximum length of String values read from input. Default limit is 20M since Jackson version 2.15.1.
Because of this new limit, mockserver fails if >20M mock response is used:
java.lang.IllegalArgumentException: com.fasterxml.jackson.core.exc.StreamConstraintsException: String length (20051112) exceeds the maximum length (20000000)
at org.mockserver.client.MockServerClient.sendRequest(MockServerClient.java:403)
at org.mockserver.client.MockServerClient.sendRequest(MockServerClient.java:429)
at org.mockserver.client.MockServerClient.upsert(MockServerClient.java:1494)
at org.mockserver.client.ForwardChainExpectation.respond(ForwardChainExpectation.java:84)
The solution you'd like
Updgrade mockserver's Jackson dependency to 2.15 and configure applicable ObjectFactory (or factories) to allow larger messages e.g. using Integer.MAX_VALUE as limit.
Describe the feature request Increase max mock response size when mockserver is used with Jackson 2.15.
What you are trying to do I'm trying to use mockserver inside a project which uses Jackson 2.15.2 dependency. This overrides Jackson version 2.14.2 from the mockserver project.
Implementation of jackson-core#863 sets upper limit on maximum length of String values read from input. Default limit is 20M since Jackson version 2.15.1.
Because of this new limit, mockserver fails if >20M mock response is used:
The solution you'd like Updgrade mockserver's Jackson dependency to 2.15 and configure applicable ObjectFactory (or factories) to allow larger messages e.g. using Integer.MAX_VALUE as limit.
Example code: https://github.com/FasterXML/jackson-core/issues/863#issuecomment-1527630381.
Describe alternatives you've considered As temporary solution I have pinned Jackson dependency to version 2.14.3.