Comments (4)
I have extended the MockServerClient with additional constructor which allows to provide full path to the application (i.e.: http://localhost:8080/mockserver). Unfortunatelly this has lead to problem with RequestUri in MockServerServlet which contains additionaly applicaiton context (for example requestUri for Reset is as follow: /mockserver/reset). The proposition for solving the issue is to cutoff httpServletRequest.getContextPath() from RequestUri in doPut and handlePOSTorGet.
from mockserver.
Thanks this is a good point I missed as I typically use Jetty without any context path.
I'll look into this in the next day or two and add some tests to make sure this is covered in future.
I'll let you know once it has been committed and added to a SNAPSHOT.
from mockserver.
I have committed a solution for this, now the MockServerClient has an additional context path parameter. In addition all matching, etc ignores the context path. As a result the context path can be changed and only the constructor call needs to be updated, all expectations should not need to change at all.
I'm closing this issue but let me know if you see anything else.
Thanks,
James
from mockserver.
I have checked and it work as expected.
Marcin
2014/1/5 James D Bloom [email protected]
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/3
.
from mockserver.
Related Issues (20)
- Possible to have early response before consuming request body
- mockserver failed to initialize the server-side SSL context
- Multiple responses for the same request are not thread-safe
- mock-server client does not support TLS v1.3 HOT 2
- How to proxy to mockserver with auth HOT 1
- "SEVERE exception validating JSON" while parsing pathparameter of openapi-generated request matchers HOT 2
- No support for multi-line MUSTACHE templates in initializerJson.json
- A memory leak caused by the reset method not removing subscribers ultimately leads to an OutOfMemoryError HOT 2
- Extract current Expectations via API
- jsonschema allOf not managed
- CVE-2023-4911 vulnerability mockserver/mockserver:0.15.0
- Eliminate use of javax.servlet-api
- Support to add Image Pull Secrets for Docker Image
- Where is James ? HOT 1
- Repeated query parameters with the same value are missing from queryStringParameters
- Creating expectations from OpenAPI without components section
- docker MockServer on Raspberry PI 4 not working - java exec format error
- JSON String body. Double quotes in verification is ignored/JSON String body unwrapping in verification
- Need some extra pointers on maximizing single instance performance
- Experiencing high latency and CPU utilization when expectations size is large
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mockserver.