User provided filepath not considered for bigger size responses (>10Kb)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 7.4k
- Forks
- 1.5k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 16
Description
We are starting wiremock in plain java way with custom path as below.
WireMockServer wireMockServer = new WireMockServer(options().port(8089).usingFilesUnderDirectory("/customPath"));
wireMockServer.start();
We observe body was null after stopping wiremock.
Found if response size is > 10kb, this code is looking for default constant path not user provided path.
Pls note this issue occurs only when response size is bigger than 10KB.
We found workaround for this issue. We increased default body size using extractTextBodiesOver to fix this. But this is just work around.
At above mentioned line, I think we have to consider user provided path instead of default. I can try to fix this if its not in pipeline.
Thanks,
Rajesh
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked code in src/main/java/com/github/tomakehurst/wiremock/store/Stores.java and trace how usingFilesUnderDirectory("/customPath") is passed into response-body storage. Reproduce the issue with a response larger than 10KB, then verify that stopping WireMock preserves the body under the user-provided path without relying on extractTextBodiesOver.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100