Annotate

spec/json/pass4.json @ 13765:7c57fb2ffbb0 13.0

mod_websocket: Merge session close handling changes from mod_c2s (bug fixes) This should bring some fixes and general robustness that mod_websocket had missed out on. The duplicated code here is not at all ideal. To prevent this happening again, we should figure out how to have the common logic in a single place, while still being able to do the websocket-specific parts that we need. The main known bug that this fixes is that it's possible for a session to get into a non-destroyable state. For example, if we try to session:close() a hibernating session, then session.conn is nil and the function will simply return without doing anything. In the mod_c2s code we already handle this, and just destroy the session. But if a hibernating websocket session is never resumed or becomes non-resumable, it will become immortal! By merging the fix from mod_c2s, the session should now be correctly destroyed.
author Matthew Wild <mwild1@gmail.com>
date Tue, 11 Mar 2025 18:44:40 +0000
parent 12792:997f3ca90628
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12792
997f3ca90628 util.json: Accept empty arrays with whitespace (fixes #1782)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
1 {
997f3ca90628 util.json: Accept empty arrays with whitespace (fixes #1782)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
2 "one": [
997f3ca90628 util.json: Accept empty arrays with whitespace (fixes #1782)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
3
997f3ca90628 util.json: Accept empty arrays with whitespace (fixes #1782)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
4 ],
997f3ca90628 util.json: Accept empty arrays with whitespace (fixes #1782)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
5 "two": [],
997f3ca90628 util.json: Accept empty arrays with whitespace (fixes #1782)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
6 "three": [ ],
997f3ca90628 util.json: Accept empty arrays with whitespace (fixes #1782)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
7 "four": [ ]
997f3ca90628 util.json: Accept empty arrays with whitespace (fixes #1782)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
8 }