Comments (4)
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.
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.
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.
@hiteshchopra11 Would be very appreciated if you would kindly guide me on how to remove okhttp client interceptor?
from okhttp-eventsource.
Related Issues (20)
- please tag the version 1.8 :) HOT 1
- HttpBasic Auth HOT 2
- Default EventSources have a funny Logger Name HOT 3
- Possibility to override default headers HOT 2
- Bug: cleaning up threadpools does not work? HOT 4
- EventSource.restart() throws java.lang.NoClassDefFoundError HOT 2
- android.os.NetworkOnMainThreadException when closing. HOT 2
- Setting log level to BODY deactivates EventHandler HOT 5
- Different header for every reconnect HOT 6
- Dynamically update SSE URL in case of reconnect HOT 6
- [ClassNotFoundException] Didn't find class "java.time.Duration" HOT 4
- Supporting Content-Encoding HOT 2
- jitpack builds failed HOT 3
- how to add security token? HOT 2
- OPEN state but no messages HOT 3
- Already shut downed eventSource its eventHandler's onOpen() method is still called afterwards HOT 2
- Support POST request
- Maven dependecy is not get resolved ( Env: Intellij Idea Community Edition HOT 1
- I can't open the doc website http://javadoc.io/doc/com.launchdarkly/okhttp-eventsource HOT 2
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 okhttp-eventsource.