Tomcat sends a slightly different reponse and the client sees it
differently in the malformed chunk scenario. It would be good to have
the same features for Undertow.
See gh-270.
The problem is that the bootstrap context gets created first
with the correct wiremock server port, and then the environment
is merged into the main context before the annotation
property source is created, so the latter takes precedence.
Fixed by re-ordering the property sources if detected.
Also switch off bootstrap context for wiremock server
Fixes gh-225
without this change the pattern for stubs contains an unnecessary / which corrupts the location search (e.g. /_files is converted to //_files and there is no such path)
with this change we're removing that value
fixes#216
without this change the only criterion for matching of requests was URL / headers / content. The method check was missing
with this change we verify if the HTTP method matches too
fixes#163
The problem is that it is a Spring Boot app (really tiny one), so
it binds to server.* in the environment, if you try to use
the stock ServerProperties. We only need a subset of the features
so it's actually relatively easy to wrap it and use a delegate.
If user loads stubs from a directory, the order of the resources
is best left to the comparator by default. If the user wants to
order stubs explicitly, she now has to use ignoreExpectOrder(false)
(the default is true, unlike the normal mock mvc server).
It turns out the WireMock does not (I think) contain a comparator
that helps. We have made a custom comparator that helps a bit
(it orders requests with the same URL in reverse order of the
number of headers matched).
Wrapping the WireMock matcher in a Hamcrest matcher, and also
using WireMock's native support for sorting mappings, so the
most specific match comes first.