Coder Social home page Coder Social logo

Comments (4)

tanderson-ld avatar tanderson-ld commented on June 15, 2024 1

We don't intend to behave a certain way based on externally added interceptors, but perhaps it was leading to modification of the data our code was receiving? I haven't had a change to dig in deeper yet on how peek could interfere. It doesn't seem like it should.

from okhttp-eventsource.

tanderson-ld avatar tanderson-ld commented on June 15, 2024

Hi @rubenquadros12 , thank you for reporting this issue. We have filed it internally as 205140. I'm not sure when one of our engineers will get a chance to investigate, but we'll update this issue when we do. Thank you.

from okhttp-eventsource.

hiteshchopra11 avatar hiteshchopra11 commented on June 15, 2024

Hey @tanderson-ld, thanks for responding. We have identified what caused the issue. Actually it was related to one of the interceptors used by the Okhttp client inside our app. Very similar to this issue, we noticed that one of the interceptors added in the Okhttp client, uses response.peekBody(Long.MAX_VALUE) , which does the following :

Peeks up to byteCount bytes from the response body and returns them as a new response body. If fewer than byteCount bytes are in the response body, the full response body is returned. If more than byteCount bytes are in the response body, the returned value will be truncated to byteCount bytes.

After removing this interceptor from the okhttp client, the connection is successful. Is this an intended behaviour of the library?

from okhttp-eventsource.

henryngcw avatar henryngcw commented on June 15, 2024

@hiteshchopra11 Would be very appreciated if you would kindly guide me on how to remove okhttp client interceptor?

from okhttp-eventsource.

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.