Overview
| Artifact ID: | 50cff1da5f7aea2c993b4992978d998b31e99374 |
|---|---|
| Ticket: | 2911139fffffffffffffffffffffffffffffffff
http::geturl abuses vwait on async call |
| User & Date: | kjnash on 2012-10-30 09:43:54 |
Changes
- icomment:
I had problem with the same symptoms, so I'll add my comments to this tracker, though I am not sure if my fix will work for the original problem. My problem was with EOF detection when a server closes a keep-alive connection. 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.
- login: "kjnash"
- mimetype: "text/plain"
- username: "kjnash"