Skip to content
Tcl Source Code History Of Ticket 8c3de50
Login

History Of Ticket 8c3de50

Artifacts Associated With Ticket 8c3de50

  1. Ticket change [0daf1df9da] (rid 219169) by anonymous on 2023-10-07 19:33:04:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-plain"
    4. comment initialized to:
      Attached script worked with http versions 2.9.8 and 2.10a1 and using tls or twapi for https sockets.
      Current http version does not work with twapi anymore.
      Error message is as follows:
      Invalid option '-type'. 
      Must be one of -myaddr, -myport, -async, -socketcmd, -server, -peersubject, -requestclientcert, -credentials, -verifier
      
      This seems to be caused by the new option "-type $token" when creating the openCmd:
      set state(openCmd) [list {*}$defcmd {*}$sockopts -type  $token {*}$targetAddr]
      
      If I remove the "-type" option, geturl works with twapi and tls:
      set state(openCmd) [list {*}$defcmd {*}$sockopts {*}$targetAddr]
      
      Paul
      
    5. foundin initialized to: "2.10b1"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "2e499ca9e0149983f6f63603feedc5b33bc05f5e"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "29. http Package"
    15. title initialized to: "geturl not working with twapi::tls_socket anymore"
    16. type initialized to: "Bug"
  2. Add attachment "httptest.tcl" [6f00ae7c0c] (rid 219170) by anonymous on 2023-10-07 19:34:48.

  3. Ticket change [0a1933e21e] (rid 219225) by oehhar on 2023-10-10 09:33:10:

    1. icomment:
      I think, it is more an issue of twapi to pip-through the new option.
      
      In consequence, I have transfered this ticket to TWAPI bugtracker (Bug 220):
      
      [https://sourceforge.net/p/twapi/bugs/220/]
      
      If this is ok for you, I may close this ticket.
      
      Thank you and take care,
      Harald
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  4. Ticket change [b7b23f7a24] (rid 219248) by apnadkarni on 2023-10-10 15:35:51:

    1. icomment:
      Let us keep this discussion here for now please, until I understand why this is a twapi issue.
      
      What is the `-type` option and what is twapi::tls_socket supposed to do with it? The only -type option I see is for http::geturl which is a mime type but I don't think that is what this is.
      
      Harald mentions twapi should pipe through the new option, but to what? twapi::tls_socket just opens a TLS socket.
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  5. Ticket change [fa55047650] (rid 219249) by oehhar on 2023-10-10 15:46:06:

    1. icomment:
      Maybe, I am just wrong.
      Harald
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  6. Ticket change [8a2a81b81d] (rid 219250) by apnadkarni on 2023-10-10 15:57:47:

    1. icomment:
      Here something curious. Am I configuring something wrong? Could someone verify you see the same result?
      
      ```
      % package require http
      2.10b1
      % http::register http 80 [list socket]
      80 socket
      % set token [http::geturl "http://www.tcl3d.org/bawt/"]
      bad option "-type": must be -async, -backlog, -myaddr, -myport, -reuseaddr, -reuseport, or -server
      ```
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  7. Ticket change [cde56a9586] (rid 219251) by oehhar on 2023-10-10 16:22:21:

    1. icomment:
      Same result with branch main and MS_VC2015 32 bit.
      
      Sorry to blame great TWAPI...
      
      Harald
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  8. Ticket change [8e242ae692] (rid 219252) by anonymous on 2023-10-10 17:09:33:

    1. icomment:
      Hi Ashok,
      
      I see the same error message when executing your script.
      It does work, if I remove the http::register command. 
      
      Added a puts command to print the state(openCmd) value:
      Using http::register  : socket -async -type ::http::1 www.tcl3d.org 80
      Without http::register: ::http::socket -async -type ::http::1 www.tcl3d.org 80
      
      In the latter case, the replacement proc http::socket is called, which uses the token value to store a thread id.
      Maybe there should be a condition, when building the state(openCmd) string, if the called socket command is http::socket or a command specified with http::register?
      
      Paul
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
  9. Ticket change [35e23418b9] (rid 219253) by apnadkarni on 2023-10-10 17:16:11:

    1. icomment:
      Looking at why tls::socket works but not socket or twapi::tls_socket, the tls::socket is special cased by the http package and routed through socketForTls and SecureProxyConnect. The latter actually handles or at least checks for the -type option. But I don't really know how it all hangs together.
      
      Given that http::register fails for plain old Tcl `socket` as well (Harald, thanks for verifying), I'm taking the liberty of changing the bug title.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
    4. title changed to:
      geturl not working with registered protocols except tls
      
  10. Ticket change [c54699775c] (rid 219254) by apnadkarni on 2023-10-10 17:18:31:

    1. icomment:
      Paul,
      
      You're probably on the right track but I'll let someone who knows the code (@kjnash?) look into it.
      
      /Ashok
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  11. Ticket change [d09e6eba75] (rid 220916) by oehhar on 2023-12-13 11:18:25:

    1. closedate changed to: "2460291.97112976"
    2. closer changed to: "oehhar"
    3. icomment:
      Fixed by Keith, thanks !
      
      Here is the commit to core-8-branch: [7759882996].
      
      New docs explain what is going on.
      
      Thank you all,
      Harald
      
    4. login: "oehhar"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "oehhar"