diff options
author | hobbs <hobbs@noemail.net> | 2008-03-12 05:57:43 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2008-03-12 05:57:43 (GMT) |
commit | bbe7abaa5ace1eaa3929c804262e7660d41ab813 (patch) | |
tree | 81017bbcd52d2c770896c9935385d5f3c5757dd2 /library | |
parent | 0923eecfbe1250bf6b7c61780102b45c4ea34565 (diff) | |
download | tcl-bbe7abaa5ace1eaa3929c804262e7660d41ab813.zip tcl-bbe7abaa5ace1eaa3929c804262e7660d41ab813.tar.gz tcl-bbe7abaa5ace1eaa3929c804262e7660d41ab813.tar.bz2 |
* library/http/http.tcl (http::geturl): add -method option to support
* tests/http.test (http-3.1): http PUT and DELETE requests.
* doc/http.n: [Bug 1599901, 862554]
FossilOrigin-Name: 33649f231d697f5c5e7570af34db166aefd5b0c9
Diffstat (limited to 'library')
-rw-r--r-- | library/http/http.tcl | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl index 91f2dc9..d508ba0 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -8,7 +8,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.64 2008/03/12 05:39:58 hobbs Exp $ +# RCS: @(#) $Id: http.tcl,v 1.65 2008/03/12 05:57:44 hobbs Exp $ # Rough version history: # 1.0 Old http_get interface. @@ -273,9 +273,11 @@ proc http::geturl { url args } { -timeout integer } set state(charset) $defaultCharset - set options {-binary -blocksize -channel -command -handler -headers \ - -progress -query -queryblocksize -querychannel -queryprogress\ - -validate -timeout -type} + set options { + -binary -blocksize -channel -command -handler -headers + -method -progress -query -queryblocksize + -querychannel -queryprogress -validate -timeout -type + } set usage [join $options ", "] set options [string map {- ""} $options] set pat ^-([join $options |])$ @@ -532,6 +534,9 @@ proc http::geturl { url args } { fconfigure $state(-querychannel) -blocking 1 -translation binary set contDone 0 } + if {[info exists state(-method)] && $state(-method) ne ""} { + set how $state(-method) + } if {[catch { puts $s "$how $srvurl HTTP/1.0" |