Overview
| Artifact ID: | 7c386ce4fb9a863d9ffc2f74f8b30877d9927d94d444223807822d5a408f1309 |
|---|---|
| Ticket: | 55bf73b52bd77304481150b5e94d2c50d2c18b39
http reuses connections after 101 Switching Protocols |
| User & Date: | kjnash on 2022-05-10 10:04:55 |
Changes
- icomment:
All versions of http 2.9 before 2.9.7 have the bug. Also all versions of http 2.10 (these will be fixed if 2.9.7 is satisfactory). The branch bug-55bf73b52b-8.6 has a fix for Tcl 8.6 (as the new version 2.9.7 of http). The fix is almost as adrianmedranocalvo suggested: 1. Use a fresh connection if the request has "Connection: upgrade" and "Upgrade" headers. The value of -keepalive passed to http::geturl is ignored. The socket is not available for further HTTP requests. 2. If the server answers to that request with a "101 Switching Protocols" and response headers "Connection: upgrade" and "Upgrade", the socket is longer HTTP. The socket is not closed, and the -command callback passed to http::geturl is responsible for further processing. Also: 3. A test file has been added to the websocket Tcllib module. This tests simple WebSocket operations, including a regression test for this bug. Please add further tests of the websocket module to this file. 4. The bugfix should be suitable for protocol upgrades to TLS and HTTP/2, but this has not been tested. 5. The man page http(n) now has a brief section describing protocol upgrades.
- login: "kjnash"
- mimetype: "text/plain"