diff options
Diffstat (limited to 'library')
-rw-r--r-- | library/http/http.tcl | 10 | ||||
-rw-r--r-- | library/http/pkgIndex.tcl | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl index 3e6f8ec..31938cf 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.44 2003/03/19 21:57:47 dgp Exp $ +# RCS: @(#) $Id: http.tcl,v 1.45 2003/07/18 19:36:40 hobbs Exp $ # Rough version history: # 1.0 Old http_get interface @@ -25,7 +25,7 @@ package require Tcl 8.2 # keep this in sync with pkgIndex.tcl # and with the install directories in Makefiles -package provide http 2.4.3 +package provide http 2.4.4 namespace eval http { variable http @@ -288,9 +288,11 @@ proc http::geturl { url args } { } # Validate URL, determine the server host and port, and check proxy case + # Recognize user:pass@host URLs also, although we do not do anything + # with that info yet. - if {![regexp -nocase {^(([^:]*)://)?([^/:]+)(:([0-9]+))?(/.*)?$} $url \ - x prefix proto host y port srvurl]} { + set exp {^(([^:]*)://)?([^@]+@)?([^/:]+)(:([0-9]+))?(/.*)?$} + if {![regexp -nocase $exp $url x prefix proto user host y port srvurl]} { unset $token return -code error "Unsupported URL: $url" } diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl index 3adc591..82c68f5 100644 --- a/library/http/pkgIndex.tcl +++ b/library/http/pkgIndex.tcl @@ -9,4 +9,4 @@ # full path name of this file's directory. if {![package vsatisfies [package provide Tcl] 8.2]} {return} -package ifneeded http 2.4.3 [list tclPkgSetup $dir http 2.4.3 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister}}}] +package ifneeded http 2.4.4 [list tclPkgSetup $dir http 2.4.4 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister}}}] |