Closed ctranxuan closed 6 years ago
Merging #12 into master will increase coverage by
0.54%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #12 +/- ##
============================================
+ Coverage 89.18% 89.72% +0.54%
- Complexity 69 70 +1
============================================
Files 10 10
Lines 185 185
Branches 20 20
============================================
+ Hits 165 166 +1
Misses 11 11
+ Partials 9 8 -1
Impacted Files | Coverage Δ | Complexity Δ | |
---|---|---|---|
...vertx/ext/web/handler/sse/impl/SSEHandlerImpl.java | 100% <100%> (+3.44%) |
9 <0> (+1) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update d538992...da5afdf. Read the comment docs.
Thanks a lot !
Hello, When a client tries to connect to the SSEHandler with no
Accept
header (eg via a curl), the connection is rejected with a406
. The spec (https://www.w3.org/TR/2015/REC-eventsource-20150203/#text-event-stream) says however:So, in case there is no Accept header, the connection shouldn't be rejected.
The fix changes the condition of the SSEHandlerImpl to only reject connections when there is
Accept
headers that don't include "text/event-stream". If there is noAccept
header, there is no rejection.Note: the latest spec (https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events) doesn't mention this anymore.