Skip to content
Tcl Source Code History Of Ticket 3382532fff
Login

History Of Ticket 3382532fff

Artifacts Associated With Ticket 3382532fff

  1. Ticket change [e348c72218] (rid 87768) by ferrieux on 2011-07-29 23:01:38:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      This makes it impossible to use a synchronous geturl in an otherwise event-driven program (nested vwaits).
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "ferrieux"
    10. subsystem initialized to: "29. http Package"
    11. title initialized to: "Synchronous geturl uses vwait"
    12. type initialized to: "Bug"
  2. Ticket change [f02351c6f1] (rid 109134) by dkf on 2011-07-31 21:45:19:

    1. assignee changed to: "patthoyts"
  3. Ticket change [59b68a9226] (rid 118011) by ferrieux on 2011-07-31 22:20:44:

    1. icomment:
      Attached, very small, patch restores the fully sync behavior when neither -nocommand nor -timeout nor -queryprogress are specified.
      
      (Note that the fact that -queryprogress makes geturl async is not documented, and is nonetheless enforced by the http::wait in test http-3.10. So the current patch is also working around another misbehavior)
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  4. Ticket change [364b8f06d4] (rid 107085) by ferrieux on 2011-07-31 22:21:18:

    1. icomment:
      
      
      File Added - 419862: httpsync.patch
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  5. Ticket change [0ced5b88ca] (rid 114268) by ferrieux on 2011-07-31 22:44:00:

    1. icomment:
      
      
      File Deleted - 419862: 
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  6. Ticket change [0ba5176684] (rid 114033) by ferrieux on 2011-07-31 22:53:11:

    1. icomment:
      -querychannel and -channel also prevent the sync mode. The former for the same reason as -queryprogress (undocumented assumptions in tests); the latter because of heavily async fcopy machinery (could be relaxed).
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  7. Add attachment "httpsync.patch" [76e97284a1] (rid 105670) by ferrieux on 2011-07-31 23:07:16.

  8. Ticket change [d980af5b1a] (rid 107625) by ferrieux on 2011-07-31 23:07:16:

    1. icomment:
      
      
      File Added - 419867: httpsync.patch
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  9. Ticket change [180a478e4e] (rid 204057) by kjnash on 2022-09-10 12:07:04:

    1. closer changed to: "nobody"
    2. icomment:
      The patch no longer works with current http.
      
      The http package now has more asynchronous code than it did when this bug was filed in 2011.  http::Event has been made into a coroutine that yields to the event loop, with the connection made permanently non-blocking, in order to implement HTTP/1.1 pipelining.  Part of http::geturl was given the same treatment in order to prevent blocking during socket connection.  Many users want http::geturl to be asynchronous and to avoid long-running events that block a return to the event loop.
      
      These recent revisions are not needed for a synchronous HTTP connection.  The simplest way to implement synchronous http::geturl would be to use an earlier version of http with the patch provided by ferrieux.  However, the issues with -queryprogress, -querychannel, -channel, and -timeout would remain.
      
      An alternative might be to use a synchronous thread::send to run http::geturl asynchronously in another thread.  However there will be issues about how much of the script would need to be accessible to the thread running geturl.  The -proxyfilter, -progress and -queryprogress commands, the file sockets used by -channel and -querychannel, cookies, TLS and the certificate store, etc.
      
      I do not see an easy way to do synchronous http::geturl without the vwait nesting problem.
      
    3. login: "kjnash"
    4. mimetype: "text/plain"
    5. severity changed to: "Minor"