Ticket UUID: | 4565d1598d08bcabd1402922b05c804a107b3991 | |||
Title: | Type change from "request" in 1.3.1 to "connect" in 1.4 | |||
Type: | Bug | Version: | 1.4 | |
Submitter: | anonymous | Created on: | 2015-01-15 03:43:14 | |
Subsystem: | websocket | Assigned To: | emmanuel | |
Priority: | 7 High | Severity: | Important | |
Status: | Open | Last Modified: | 2015-04-16 08:01:51 | |
Resolution: | None | Closed By: | nobody | |
Closed on: | ||||
Description: |
Incompatibility *** When a new connection is established, version 1.3.1 of the WebSocket Library sent a message type of "request" via "Push $sock request [list $Client(path) $Client(query)]" line 494. In 1.4 it sends a message type of "connect". Scripts that rely on the message type of "request" break but modifying it to "connect" restores functionality. | |||
User Comments: |
anonymous (claiming to be Adrián Medraño Calvo <[email protected]>) added on 2015-04-16 08:01:51:
The change was intentional, in the sense of making server and client notifications more consistent, but unintentional with regards to breaking the API. The incompatibility can be easily fixed with the following patch. The documentation should be changed marking the event as deprecated. diff --git c/websocket.tcl i/websocket.tcl index a35f1b1..ef8b642 100644 --- c/websocket.tcl +++ i/websocket.tcl @@ -1147,6 +1147,9 @@ proc ::websocket::takeover { sock handler { server 0 } { info {} }} { Liveness $sock # Tell the WebSocket handler that the connection is now open. + if {!$server} { + Push $sock request $info; + } Push $sock connect $info; ${log}::debug "$sock has been registered as a\ aku added on 2015-04-14 23:29:46: I suspect that this change was intentional, right ? Is this change documented ? If not I would say this is only a doc change. Although it can be argued that it was an incompatible API change requiring a major version bump (because it was a change of the public API, not a simple extension). |