|
2018-04-12
| ||
| 14:05 | • Closed ticket [3581754fff]: EOF detection when a server closes a keep-alive con... artifact: 04dab8f1e3 user: kjnash | |
|
2012-11-06
| ||
| 17:41 | • Ticket [3581754fff]: 5 changes artifact: 53edf8c2a1 user: dkf | |
| 17:20 | • Ticket [3581754fff]: 5 changes artifact: f2aee3b0e6 user: dkf | |
| 01:20 | • Ticket [3581754fff]: 6 changes artifact: 75bbc4d122 user: dgp | |
|
2012-10-30
| ||
| 10:02 | • Add attachment http-fix2-for--69687a01db.patch to ticket [3581754ffffff... artifact: 793291324d user: kjnash | |
| 10:02 | • Ticket [3581754fff] EOF detection when a server closes a keep-alive connection<... artifact: 5321b0e4ae user: kjnash | |
| 09:57 | • Add attachment http-fix1-for--69687a01db.patch to ticket [3581754ffffff... artifact: ccd70fd692 user: kjnash | |
| 09:57 | • Ticket [3581754fff] EOF detection when a server closes a keep-alive connection<... artifact: bb67255f55 user: kjnash | |
| 02:57 | • New ticket [3581754fff]. artifact: 8045051e06 user: kjnash | |
EOF detection when a server closes a keep-alive connection
Closed3581754fffffffffffffffffffffffffffffffffCreated 14 years agoUpdated 9 years ago
Descriptionplain2012-10-30 02:57:47
If http::geturl is called with -keepalive 1 and a -command that enters the event loop (e.g for an authorization dialog), and the HTTP response includes a "Content-Length" header, then a (slow) race condition ensues between the server's closing of the connection, and the user's response to the dialog. If the connection is closed first, the unpatched code fails at line 1126 with repeated eof fileevents, because the command http::Eof tries repeatedly to run the user's -command, and never returns. This can be reported as "too many nested evaluations". While it might not be good style to allow the -command script to enter the event loop, http(n) does not exclude this possibility. There's more than one way to fix the bug. Two possible patches are attached. EIther will fix the bug; both fixes can be applied. Patches against core-8-5-branch checkin 69687a01db, dated 2012-10-24 11:28:33.
kjnashplain2012-10-30 09:57:49
File Added - 455664: http-fix1-for--69687a01db.patch
kjnashplain2012-10-30 10:02:09
File Added - 455665: http-fix2-for--69687a01db.patch
dgpplain2012-11-06 01:20:19
Please report whether these patches, or some other resolution of this item is needed before a Tcl 8.5.13 release.
dkfplain2012-11-06 17:20:37
Fix 2 should probably be applied anyway. That's the thing to apply for 8.5.13 (and I'll get that in in a few minutes). Fix 1 is more interesting (and doesn't mean that Fix2 shouldn't be used as well) but it requires review by someone who knows more about the http package's functioning in the presence of keepalives.
dkfplain2012-11-06 17:41:39
Applied variation on Fix 2 (don't use [unset], but rather another flag var in the state).
kjnashplain2018-04-12 14:05:45
Thanks for the fix. I've closed the ticket.
Log in (anonymous is fine) to add a comment.
Attachments:
- http-fix2-for--69687a01db.patch [download] added by kjnash on 2012-10-30 10:02:09. [details]
- http-fix1-for--69687a01db.patch [download] added by kjnash on 2012-10-30 09:57:49. [details]