Commit Graph

38 Commits

Author SHA1 Message Date
Zaiming Shi 9038da0bd2 fix(ws_connection): check origin failure should return 403 not 500 2021-10-15 15:49:26 +08:00
Zaiming Shi 6354e75626 chore: update copyrights 2021-04-23 20:43:00 +02:00
z8674558 a48e7df4f5 feat(emqx_ws_connection): check http header to know real IP/port 2021-04-14 06:45:39 +00:00
JianBo He 16c999ed9b
Start emqx-modules application by default (#4518)
* fix(modules): start emqx_modules by default

* chore(test): eliminate some compile warnings
2021-04-12 09:45:31 +08:00
Shawn 81602c973c fix(emqx): deny pingreq when mqtt not connected #4370 2021-03-19 14:17:49 +08:00
zhouzb fa8b2a5ac5 chore(test-cswsh): add test case for cswsh 2021-03-19 10:28:13 +08:00
Shawn d6797760a1 fix(test): add testcases for ws subprotocols 2021-03-17 14:59:05 +08:00
tigercl 5878950dc3
feat(websocket): support for checking subprotocols (#4099) 2021-01-28 20:42:57 +08:00
JianBo He 739e49218f
fix(cm): fix the problem of registering a channel twice (#3831) 2020-12-28 11:03:29 +08:00
Zaiming Shi d67212e7fa chore(test): Make test profile build 2020-12-11 08:19:26 +01:00
zhouzb e232032ec0 fix(mqtt-piggyback): fix test case 2020-08-22 15:27:11 +08:00
JianBo He 83a2af812f feat(ratelimit): refactor ratelimit 2020-07-31 18:07:20 +08:00
terry-xiaoyu 6ad65d587e feature(properties): add properties in message header
1. Add MQTT5.0 properties when invoking the hooks.

- Add a new key `properties` into the message header:

  We used to put all of the properties into the `#message.headers`:

  ```erlang
  #message{headers = #{'User-Property' => {<<"reason">>,<<"normal">>},
                       'Message-Expiry-Interval' => 60,
                       allow_publish => true}
  ```

  I put them instead under a single key:

  ```erlang
  #message{headers = #{properties =>
                        #{'User-Property' => {<<"reason">>,<<"normal">>},
                          'Message-Expiry-Interval' => 60},
                       allow_publish => true}
  ```

  Note that the column `properties` may contain all the properties for
  Publish and Will messages.

- Add `disconn_props` into the `Channel.conninfo`

- Add `puback_props` also into the message header:

  ```erlang
  #message{headers = #{puback_props =>
                        #{'User-Property' => {<<"reason">>,<<"normal">>}},
                       allow_publish => true}
  ```

2. Change the data type of `#message.headers` and `#message.flags` to map.

   It used to support `undefined`.
2020-06-17 18:46:26 +08:00
turtleDeng 6b8ffc386a Fix WS reason code (#3149) 2020-01-04 10:06:50 +08:00
zhouzb 7ea75f4289 Update copyright 2020-01-03 18:31:08 +08:00
turtled eea5e14b0c Fix event/message out of order 2019-12-16 22:12:56 +08:00
Feng Lee 721dd5d8a2 Update the test cases of emqx_ws_connection module 2019-12-16 12:46:48 +08:00
Feng Lee f46cfbaa62 Fix the 'badmatch' error 2019-12-16 11:25:47 +08:00
Feng Lee c5c99b7c4e Improve 'emqx_ws_connection' module and add more test cases 2019-12-13 18:07:59 +08:00
Feng Lee 9c3273a2c6 Improve the process of handling MQTT control packets (#3079) 2019-12-06 19:51:06 +08:00
terry-xiaoyu b17a54d392 Fix testcases for emqx_ws_connection 2019-11-01 20:25:43 +08:00
张奇怪 c713d619da
Add more test cases (#2992)
* Add more test cases for emqx_stats and emqx_os_mon
Fix test case error for emqx_ws_connection

* Add more test cases for emqx_sys_mon

* Update erlang otp to 22.1 for travis ci

* Delete readable=false for make ct

* Add unset_all_env for emqx_zone and update test cases
2019-10-24 15:41:26 +08:00
Feng Lee 7117dde879 Add more test cases for connection, channel and session modules 2019-10-21 17:14:50 +08:00
Feng Lee cd4adbada0 Add more test cases for connection, channel and session modules 2019-10-18 18:53:31 +08:00
Feng Lee 7175e4a74c Set 'boot_modules' when starting emqx apps. 2019-09-06 17:36:34 +08:00
GilbertWong 3f20bcf58f Relace emqx_client with emqtt 2019-08-22 14:27:29 +08:00
Feng Lee f26505d40a Implement session takeover and resumption.
- Implement session takeover
- Remove `init_proc_mng_policy/1' from emqx_misc module
- Remove `conn_proc_mng_policy/1' from emqx_misc module
- Add `emqx_oom' module to monitor OOM of channel process
2019-08-17 13:37:48 +08:00
Feng Lee 1d88f8fd9e Improve the emqx_connection, emqx_ws_connection and emqx_frame modules (#2611)
* Adopt channel architecture and improve the MQTT frame parser

* Update the test cases for emqx_channel, emqx_protocol

- Improve emqx_client to Use the new emqx_frame:parse/2
- Update the ct suites for emqx_channel, emqx_ws_channel

* Fix test case
2019-06-14 12:44:27 +08:00
Gilbert d3e7d1f0c9 Fix websocket bug (#2615)
Fix websocket bug.

Prior to this change, websocket connection would be closed directly
without sending connack packet when acl check fails.

This change fix this bug.
2019-06-14 11:33:44 +08:00
Gilbert Wong b3927ff730 Add emqx_ct_helpers as deps and refactor test suites 2019-04-25 13:41:22 +08:00
Gilbert Wong f1616c33d9 Convert value of attribute table to map 2019-04-13 10:35:59 +08:00
linjun 814fd3fc9e Fix test case 2019-02-28 16:36:47 +08:00
linjun 37c7e684b0 Adjusting code 2019-02-28 14:32:13 +08:00
linjun 16165ce935 Use conn_mod instead of socktype 2019-02-28 11:32:05 +08:00
linjun 1fe7431370 Adjusting test case 2019-02-27 16:33:49 +08:00
turtled 31e95b56c4 Update Copyright to 2019 2019-01-29 10:43:25 +08:00
tigercl bc31faac6b Fix will msg (#2156)
* Remove will_msg and will_topic from protocol state

* Modify try_open_session/1
2019-01-17 13:57:42 +08:00
YoukiLin 78b3c375d8
Improving 'emqx_ws_connection' coverage (#2107) 2019-01-03 12:59:39 +08:00