Comments (11)
Agree it'd be better to accurately preserve all the incoming headers. The Apache HTTP client doesn't make explicitly making the Transfer-Encoding/Content-Length choice particularly easy, but it's definitely possible. I'll add it to the list.
from wiremock.
Thanks very much for adding to your wish list. And, thank you for sharing such a useful piece of your work.
from wiremock.
Think I've got this fixed now. It's committed to master now if you want to build it and try it out.
I've got a few other changes in flight so I'll release it in the next few days when those are done.
from wiremock.
Did a pull and build. I'm having the same problem building the standalone jar that others have mentioned. You mentioned in issue #26 that PGP is needed to allow the signing step to work.
Can I use a free software alternative instead, like GPG? What tools are you using?
from wiremock.
Try this:
$ gradle clean jarAll
That should skip the signing step but still produce the standalone JAR.
Failing that you could probably just delete these two bits from the build file:
apply plugin: 'signing'
signing { sign configurations.archives }
from wiremock.
That did the trick! The chunked requests go through now.
I had to make another change to get things working. In my situation, the requests include a "Host:" header that needs to be passed through as well. One more quick hack got wiremock working as a proxy for this web service, on my machine anyway. I will fork the repo and see if I can make a cleaner fix. If so, I'll send a pull request so you can see the change.
That said, you have fixed the original issue. Thanks!
from wiremock.
I can fix the host header part easily enough. I'll add that before I release it.
from wiremock.
I've fixed the host header thing and released this now (it should arrive on m2 central in a few hours).
from wiremock.
Hi @tomakehurst, Similar to the above problem I faced an issue with Proxy when the response returned by the actual service had the transfer-encoding header "chunked".
In the standalone mode, this header is lost & replaced by "content-length".
In the Webapp mode, there is no response from the service.
I resolved it for my local web app by overriding the implementation of DispatcherServlet & invoke httpServletResponse.getOutputStream().flush() if there is "chunked" header.
All these problems are with version 1.53
from wiremock.
Yeah, unfortunately because it buffers responses at the moment, you always end up with a known-length byte array and hence a Content-Length header being added by Jetty.
I'll have a look at fixing this in a future version I think, as it's useful to be able to test with both.
from wiremock.
Thanks @tomakehurst for looking into my request.
from wiremock.
Related Issues (20)
- Support virtual threads in Jetty server for standalone deploy
- Error when proxying to a host that is only accessible via IPv6 HOT 1
- Formatted dates not in UTC
- __files created by default since v3.6.0 HOT 1
- absent operand must be a non-null string
- Array and data manipulation in handlebars template when using docker
- FileItemPartAdapter returning multipart's field name instead of a filename
- Avoiding reading zipfile entries repeatedly in ClasspathFileSource
- Support disabled state for stub mappings HOT 1
- Add a unique id to the template request model
- Add self-description callback(s) to MatchResult for use in Diff
- Report webhook errors and results as sub-events
- Support mTLS (client certificate) for standalone WireMock client
- urlPathTemplate does not work in combination with queryParameters HOT 1
- Allow loading a stub for a single file instead of a directory
- Make checking for duplicate IDs optional HOT 2
- No command line option to set template escape disabled to false
- ID reported as already taken when registering a single stub HOT 2
- Optimal order of offsetting and truncating expected date/time values
- Recording fails when JSON in a request was invalid
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 wiremock.