Artifacts Associated With Ticket 759888ffffffffff
Ticket change [7928309dd0] (rid 90082) by dossy on 2003-06-24 15:40:40:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
http::geturl throws an error when presented a URI that has a username and/or password embedded in the URI. Here's an example: % package require http 2.4.2 % ::http::geturl http://username:password@localhost/ Unsupported URL: http://username:password@localhost/ What needs to be fixed is http2.4/http.tcl, lines 290-- 296: 290 # Validate URL, determine the server host and port, and check proxy case 291 292 if {![regexp -nocase {^(([^:]*)://)?([^/:]+)(: ([0-9]+))?(/.*)?$} $ur l \ 293 x prefix proto host y port srvurl]} { 294 unset $token 295 return -code error "Unsupported URL: $url" 296 } I'm working on writting a better regexp to handle better (and hopefully, complete) URI parsing. I'll attach it as a patch as soon as I get it working and tested, unless someone beats me to it. -- Dossy - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dossy"
- subsystem initialized to: "29. http Package"
- title initialized to:
http::geturl fails on URIs with username/password in them
- type initialized to: "Bug"
Ticket change [15c38fed78] (rid 124625) by dossy on 2003-06-24 22:46:36:
- icomment:
Logged In: YES user_id=21885 Here's a revised regexp that at least fits my needs -- if {![regexp -nocase {^(([^:]*)://)?([^@]+@)?([^/:]+)(:([0- 9]+))?(/.*)?$} $url \ -- Dossy - login: "dossy"
- mimetype: "text/plain"
- username: "dossy"
- icomment:
Ticket change [9be9e2016c] (rid 111202) by hobbs on 2003-07-19 02:36:15:
- closedate changed to: "2003-07-18T19:36:15"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 added to 8.5a and 8.4.4 for http 2.4.4.
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "hobbs"