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/http.tcl | |
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/http.tcl')
-rw-r--r-- | library/http/http.tcl | 10 |
1 files changed, 6 insertions, 4 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" } |