diff options
author | hobbs <hobbs> | 2003-07-18 19:36:40 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2003-07-18 19:36:40 (GMT) |
commit | 9dc1deb815dd43734b59bbc5d4dbb7c28e13faf5 (patch) | |
tree | 60da98a853f30e7667b20ecb3a1e0724296e07c4 /library/http | |
parent | 2fbb36cdb77e640aa7cd11eddf6d19a7ac5c4490 (diff) | |
download | tcl-9dc1deb815dd43734b59bbc5d4dbb7c28e13faf5.zip tcl-9dc1deb815dd43734b59bbc5d4dbb7c28e13faf5.tar.gz tcl-9dc1deb815dd43734b59bbc5d4dbb7c28e13faf5.tar.bz2 |
* library/http/pkgIndex.tcl: upped to http v2.4.4
* library/http/http.tcl: add support for user:pass info in URL.
* tests/http.test: [Bug 759888] (shiobara)
Diffstat (limited to 'library/http')
-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}}}] |