GithubHelp home page GithubHelp logo

Comments (11)

tomakehurst avatar tomakehurst commented on July 19, 2024

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.

bluemarble avatar bluemarble commented on July 19, 2024

Thanks very much for adding to your wish list. And, thank you for sharing such a useful piece of your work.

from wiremock.

tomakehurst avatar tomakehurst commented on July 19, 2024

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.

bluemarble avatar bluemarble commented on July 19, 2024

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.

tomakehurst avatar tomakehurst commented on July 19, 2024

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.

bluemarble avatar bluemarble commented on July 19, 2024

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.

tomakehurst avatar tomakehurst commented on July 19, 2024

I can fix the host header part easily enough. I'll add that before I release it.

from wiremock.

tomakehurst avatar tomakehurst commented on July 19, 2024

I've fixed the host header thing and released this now (it should arrive on m2 central in a few hours).

from wiremock.

yogamaha avatar yogamaha commented on July 19, 2024

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.

tomakehurst avatar tomakehurst commented on July 19, 2024

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.

yogamaha avatar yogamaha commented on July 19, 2024

Thanks @tomakehurst for looking into my request.

from wiremock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.