Commit Graph

312 Commits

Author SHA1 Message Date
Damien Arrachequesne
cbd341c2c9 docs: update website 2020-12-11 15:16:25 +01:00
Damien Arrachequesne
2b5dfb99f8 fix: check the type of the initial packet
Before this fix, the client could mark the polling transport as open
even though the handshake packet was not received properly (for
example, after a parsing error).

See also: 1c8cba8818
2020-12-11 15:02:48 +01:00
Damien Arrachequesne
dfe65e3b3b feat: add an extraHeaders option
Similar to the option of the JS client:

```java
opts = new Socket.Options();
opts.extraHeaders = singletonMap("authorization", singletonList("bearer abcd"));
socket = new Socket(opts);
```

Note: the refactor of the options (similar to [1]) will be done in a
future step.

[1] 5f47a50ee5
2020-12-11 14:20:45 +01:00
Damien Arrachequesne
41f89a38b7 feat: add support for Engine.IO v4
Reference: https://github.com/socketio/engine.io-protocol#difference-between-v3-and-v4
2020-12-11 14:19:59 +01:00
Damien Arrachequesne
b1b7002691 docs: add changelog for version 1.0.1 2020-12-10 14:26:00 +01:00
Damien Arrachequesne
475f89a8e0 chore(release): prepare for next development iteration 2020-12-10 14:07:39 +01:00
Damien Arrachequesne
7b3cc94af9 chore(release): prepare release engine.io-client-1.0.1 2020-12-10 14:07:39 +01:00
Damien Arrachequesne
8016a5d746 chore: bump OkHttp client version
Versions above 3.12.x have dropped support for Java 7.

Related: https://square.github.io/okhttp/changelog_3x/#version-3130
2020-12-10 12:38:30 +01:00
Damien Arrachequesne
180db9516f ci: add java 7 in the test matrix
It was already present in the Travis test matrix.
2020-12-08 23:49:21 +01:00
Jacek Mleczek
6f065b7a62 fix: handle responses without content type (#101)
This fixes NullPointerException when response doesn't have content type. Exception stack trace:

```
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String okhttp3.MediaType.toString()' on a null object reference
        at io.socket.engineio.client.transports.PollingXHR$Request.onLoad(PollingXHR.java:271)
        at io.socket.engineio.client.transports.PollingXHR$Request.access$700(PollingXHR.java:148)
        at io.socket.engineio.client.transports.PollingXHR$Request$1.onResponse(PollingXHR.java:232)
        at okhttp3.RealCall$AsyncCall.execute(RealCall.java:141)
        at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
```
2020-12-08 23:47:44 +01:00
Damien Arrachequesne
5c6519727f chore: bump engine.io server version 2020-12-08 11:18:16 +01:00
Damien Arrachequesne
9a7176bae6 ci: migrate to GitHub Actions
Due to the recent changes to the Travis CI platform (see [1]), we will
now use GitHub Actions to run the tests.

Note: the certificate was updated because it failed with newer Node.js versions

```
_tls_common.js:129
      c.context.setCert(cert);
                ^

Error: error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small
    at Object.createSecureContext (_tls_common.js:129:17)
    at Server.setSecureContext (_tls_wrap.js:1328:27)
```

Reference: https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-java-with-maven

[1]: https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing
2020-12-08 11:18:16 +01:00
nkzawa
559eb38de1 [maven-release-plugin] prepare for next development iteration 2017-07-14 14:50:44 +09:00
nkzawa
fb1e448856 [maven-release-plugin] prepare release engine.io-client-1.0.0 2017-07-14 14:50:33 +09:00
nkzawa
17dc5b4a60 add loggable checks 2017-07-14 14:43:44 +09:00
nkzawa
bfad012739 prepare release 2017-07-14 14:04:50 +09:00
Naoyuki Kanezawa
09629049d8 Merge pull request #93 from socketio/fix/compatible-v3
Update to make compatible with engine.io v3
2017-07-14 13:39:27 +09:00
nkzawa
8b1fbdcc99 update README 2017-07-14 09:38:03 +09:00
nkzawa
ce1c29daeb update travis setting 2017-07-13 15:41:49 +09:00
nkzawa
cad9a3f85c update README 2017-07-13 13:00:58 +09:00
nkzawa
c8867048dd add the transportOptions option 2017-07-13 12:51:29 +09:00
nkzawa
46de5813ca run tests against engine.io 3.1.0 2017-07-13 12:47:48 +09:00
nkzawa
1b3c795210 update parser to not utf8 encode for string payloads 2017-07-13 12:47:00 +09:00
nkzawa
8b07bbd9f0 utf8: add strict option 2017-07-12 12:31:41 +09:00
nkzawa
e4f1a56cfc test: shutdown okhttpclient 2017-07-12 12:30:12 +09:00
nkzawa
4f5f774a46 update History.md 2017-07-12 02:33:21 +09:00
nkzawa
60a0f96905 [maven-release-plugin] prepare for next development iteration 2017-07-12 02:13:43 +09:00
nkzawa
80cf5a1d41 [maven-release-plugin] prepare release engine.io-client-0.9.0 2017-07-12 02:13:28 +09:00
nkzawa
8a35f112fa update version 2017-07-12 01:53:26 +09:00
nkzawa
3ce2c9b72e cache response.body call just in case 2017-07-11 21:27:11 +09:00
nkzawa
f3d92f9aac polling-xhr: always close body 2017-07-11 21:26:22 +09:00
nkzawa
75da2ea0b7 bump okhttp 2017-07-11 20:23:35 +09:00
Naoyuki Kanezawa
8ead93d87f Merge pull request #92 from socketio/compatible-1.8.4
update for engine.io-client 1.8.4
2017-07-11 20:14:43 +09:00
nkzawa
850a5110b9 set accept header 2017-07-11 19:44:30 +09:00
nkzawa
633120459f test against engine.io 1.8.4 2017-07-11 19:11:28 +09:00
nkzawa
bb323f00ae onPacket now emits data on 'closing' state as well 2017-07-11 19:10:40 +09:00
nkzawa
115f32171d parser: check empty arg 2017-07-11 18:16:49 +09:00
Yu-Hsuan Lin
b2798fe85d Merge pull request #85 from b95505017/share_okhttp
Options for inject okhttp Call/WebSocket factory
2017-05-03 00:41:11 +08:00
Yu-Hsuan Lin
c817af5b22 Options for inject okhttp Call/WebSocket factory 2017-05-02 17:07:43 +08:00
nkzawa
80535c6304 [maven-release-plugin] prepare for next development iteration 2016-12-12 17:53:30 +09:00
nkzawa
59ab4c7445 [maven-release-plugin] prepare release engine.io-client-0.8.3 2016-12-12 17:53:22 +09:00
nkzawa
fd929e6664 prepare next release 2016-12-12 17:43:24 +09:00
Naoyuki Kanezawa
d1fda2f933 Merge pull request #78 from b95505017/okhttp35
okhttp-ws into okhttp
2016-12-03 09:19:38 +09:00
Yu-Hsuan Lin
657d8e89b5 okhttp-ws into okhttp 2016-12-02 16:26:28 +08:00
Naoyuki Kanezawa
8f8e060037 Merge pull request #74 from VicV/master
Upgrade OkHttp-ws to newest version (3.4.2)
2016-11-22 22:25:48 +09:00
vicv
201e915a2c 3.4.2 2016-11-04 12:31:53 -04:00
nkzawa
822bef1407 [maven-release-plugin] prepare for next development iteration 2016-10-22 11:44:50 +09:00
nkzawa
2371550c9c [maven-release-plugin] prepare release engine.io-client-0.8.2 2016-10-22 11:44:41 +09:00
nkzawa
e373455eb9 prepare 0.8.2 2016-10-22 11:30:19 +09:00
Naoyuki Kanezawa
78585e7b4a Merge pull request #73 from eckovation/master
fix added to fix following crash
2016-10-13 15:50:34 +09:00