Skip to content
Tcl Source Code History Of Ticket e5ed1bb28b
Login

History Of Ticket e5ed1bb28b

Artifacts Associated With Ticket e5ed1bb28b

  1. Ticket change [2f3f6b3447] (rid 199902) by anonymous on 2022-04-03 17:30:13:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      While procedure "::http::geturl" is working correctly with host names and numeric IPv4 addresses (e.g. loopback address "127.0.0.1"), it is failing with numeric IPv6 addresses (e.g. loopback address "::1").
      
      Example:
         package require http
         set url "http://\[::1\]:8080/0/0/0.png"
         set rc [catch {::http::geturl $url} token]
         set ncode [::http::ncode $token]
         set data  [::http::data $token]
      Result:
         rc    = 0
         token = ::http::1
         ncode = 400
         data  = "<h1>Bad Message 400</h1><pre>reason: Bad HostPort</pre>"
      
      Reason:
      URL's host and port parts are concatenated and saved in local variable "state(socketinfo)" by statement
         set state(socketinfo) $host:$port
      -> state(socketinfo) = ::1:8080
      and later on, host and port are restored from local variable by following statements
         set host [lindex [split $state(socketinfo) :] 0]
         set port [lindex [split $state(socketinfo) :] 1]
      -> host = ""
         port = ""
      Solution:
      Restoring host and port from local variable by statement
         regexp {(.+):([^:]+)} $state(socketinfo) {} host port
      -> host = "::1"
         port = "8080"
      is working with IPv4 and IPv6 addresses as well as with host names:
         set rc [catch {::http::geturl $url} token]
         set ncode [::http::ncode $token]
         set data  [::http::data $token]
      Result:
         rc    = 0
         token = ::http::1
         ncode = 200
         data  = <response as expected from web server>
      
    5. foundin initialized to: "2.9.5, 2.10, ???"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "97cf2819eb5714572703833980f8863ede11fec8"
    10. resolution initialized to: "None"
    11. severity initialized to: "Severe"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "29. http Package"
    15. title initialized to: "Issue if URL contains numeric IPv6 address"
    16. type initialized to: "Bug"
  2. Ticket change [82cad836db] (rid 199927) by jan.nijtmans on 2022-04-04 11:51:21:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459673.99399623"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Fixed in all branches now.
      
      Thanks!
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"