Comments (2)
Sorry for the delay in responding to this. This should be a simple fix. To be clear, the problem is not exactly that addDefaultHeader
is overwriting your Accept header; if you look at how that method is implemented, it is putting the standard Accept header in first, and then applying the headers you specified. The problem is that Headers.Builder.add()
does not overwrite existing values; it adds to them, so you are ending up with two values for the Accept
header. That is theoretically OK, but your server might not be set up to handle it (like, maybe it is checking for an exact match to one specific value).
So, it should be easy enough for us to make it simply omit the default value for Accept
or Cache-Control
if you provided your own value(s).
from okhttp-eventsource.
Fixed in 1.10.1.
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
- 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
- Latest version doesn't connect to the server properly [4.1.0] HOT 4
- 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.