Skip to content
Tcl Source Code History Of Ticket 874321ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 874321ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 874321ffffffffffffffffffffffffffffffffff

  1. Ticket change [271b913254] (rid 88460) by matben on 2004-01-10 07:58:31:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      If http::geturl used with -timeout > 0 it may timeout in the 
      middle of the transaction since there is no after cancel 
      except in http::Finish which is too late.
      
      Fix:
      Add this to http::Connect
      
      if {[info exists state(after)]} {
          after cancel $state(after)
          unset state(after)
      }
      
    4. foundin initialized to: "obsolete: 8.4.5"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "matben"
    9. subsystem initialized to: "16. Commands A-H"
    10. title initialized to: "http timeouts"
    11. type initialized to: "RFE"
  2. Ticket change [d7cd665999] (rid 107327) by dkf on 2004-01-12 19:58:25:

    1. assignee changed to: "hobbs"
    2. subsystem changed to: "29. http Package"
  3. Ticket change [128dae727c] (rid 124053) by dgp on 2004-01-13 14:27:26:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Is this really a bug?
      
      You asked the connection to timeout
      after some period, and it did.  The docs
      don't say anything about canceling the
      timeout just because activity starts
      on the connection.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [b1e68066ff] (rid 98243) by matben on 2004-01-13 15:54:00:

    1. icomment:
      Logged In: YES 
      user_id=108900
      
      timeout is timeout only for the socket to connect. It is not 
      a timeout for the file transport since this can take hours 
      for large files.
      
      
      
    2. login: "matben"
    3. mimetype: "text/plain"
    4. username: "matben"
  5. Ticket change [447ff1461e] (rid 116722) by dkf on 2004-01-13 16:19:22:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Hmm.  Is it possible to update/cancel the timeout on an HTTP
      connection?  If not and we added it, I think it would allow
      the sort of sophisticated behaviour that Mat's after.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  6. Ticket change [72615ae98a] (rid 100849) by matben on 2004-01-13 18:52:40:

    1. icomment:
      Logged In: YES 
      user_id=108900
      
      This is not a sophisticated behaviour. It is standard that 
      any timeout is only applicable to the socket connecting. If 
      you want to cancel an existing http query just use 
      http::reset (I think).
      
      
      
    2. login: "matben"
    3. mimetype: "text/plain"
    4. username: "matben"
  7. Ticket change [d4cba86f1a] (rid 123504) by nobody on 2004-05-07 08:59:42:

    1. icomment:
      Logged In: NO 
      
      I think that both arguments are valid. I would use the
      current timeout to cancel a http remote procedure call, but
      I would also like to have a -connectTimeout option to abort
      the process if a connection can not be made. By default, the
      TCP/IP timeout of 2 minutes is in effect, but that is too
      long for most situations. I proposed this some years back
      and was dismissed. Since TCL 8.0 I have been tweaking every
      release of http to add a -connectTimeout option to the
      http::get method.
      
      
      
    2. login: "nobody"
    3. mimetype: "text/plain"
    4. username: "nobody"
  8. Ticket change [0173ecee84] (rid 119486) by hobbs on 2004-05-26 05:11:13:

    1. closedate changed to: "2004-05-25T22:11:13"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      This is the documented behavior.  You don't want the timeout
      reset once the socket just becomes writable, the timeout is
      for the entire transaction.  If you have a long-running
      transaction, you want it to timeout at any phase of geturl.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"
    8. username: "hobbs"
  9. Ticket change [367a1194de] (rid 107108) by dkf on 2004-05-26 15:18:17:

    1. assignee changed to: "nobody"
    2. foundin changed to: "None"
    3. resolution changed to: "None"
    4. status changed to: "Open"
    5. subsystem changed to: "None"
    6. title changed to: "Timeout during connect"
  10. Ticket change [bca06492a0] (rid 101783) by dkf on 2004-05-26 15:18:52:

    1. subsystem changed to: "29. http Package"
  11. Ticket change [3c9148c9f3] (rid 120936) by dkf on 2006-06-30 15:20:44:

    1. assignee changed to: "hobbs"
    2. icomment:
      Logged In: YES 
      user_id=79902
      
      What's really missing is the ability to do the DNS lookup
      asynchronously when doing a [socket -async]. But that's very
      tricky (and I think is a different FRQ).
      
      Aside from that, adding the ability to set different
      timeouts for different stages of the [geturl] processing
      would be a nice extension. Assigning to area maintainer so
      this doesn't get lost.
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. username: "dkf"
  12. Ticket change [2fdbc9cff2] (rid 93142) by patthoyts on 2006-12-09 03:10:41:

    1. icomment:
      Logged In: YES 
      user_id=202636
      Originator: NO
      
      I agree that there are two different timeouts being covered here. The current -timeout option is documented as a global timeout that covers not just the connection phase but the whole transaction. What is being requested is a separate connection-only timeout that should be cancelled once we have a tcp connection to the server. I suspect that on most occasions that there is a problem in this phase it is actually a DNS lookup issue and in this case we are blocked in the C runtime and cannot actually do anything about it.
      
      
    2. login: "patthoyts"
    3. mimetype: "text/plain"
    4. username: "patthoyts"
  13. Ticket change [bd5ff4be05] (rid 204018) by kjnash on 2022-09-09 16:50:33:

    1. assignee changed to: "aku"
    2. closer changed to: "nobody"
    3. comment changed to:
      If http::geturl used with -timeout > 0 it may timeout in the 
      middle of the transaction since there is no after cancel 
      except in http::Finish which is too late.
      
      Fix:
      Add this to http::Connect
      
      if {[info exists state(after)]} {
          after cancel $state(after)
          unset state(after)
      }
      
    4. icomment:
      For the DNS lookup issue, see also bug [824251] "async client sockets block for DNS" in Sec. 27 "Channel Types".  http::geturl now has an optional workaround that allows the script to wait in the event loop while the connection is made.
      
      Another possible interpretation of "timeout" is that it applies after a period of inactivity - not only when creating the socket, but at any time in the transaction.  This would not be difficult to implement - the timeout event would be cancelled and re-started whenever an event handler is called.
      
      However, we do not need two timeout flags.  The documented -timeout remains.
      
    5. login: "kjnash"
    6. mimetype: "text/x-fossil-plain"
    7. severity changed to: "Minor"