summaryrefslogtreecommitdiffstats
path: root/library/http/http.tcl
Commit message (Collapse)AuthorAgeFilesLines
* 2000-04-21 Sandeep Tamhankar <sandeep@scriptics.com>sandeep2000-04-221-9/+19
| | | | | | | | | | | * library/http2.1/http.tcl: Fixed a newly introduced bug where if there's a -command callback and something goes wrong, geturl threw an exception, called the callback, and unset the token. I changed it so that it will not call the callback when throwing an exception (so the caller only finds out about a given error from one place). Also, fixed http::ncode so that it actually gives you back the http return code (i.e. 200, 404, etc.) instead of the first digit of the version of HTTP being used (i.e. 1).
* More thrashing with the "server closeswelch2000-04-221-14/+30
| | | | | | without reading post data" scenario. Reverted to the previous filevent configuratiuon, which seems to work better with small amounts of post data.
* Adjusted file events and unified error handling.welch2000-04-091-71/+110
|
* 2000-03-29 Sandeep Tamhankar <sandeep@scriptics.com>sandeep2000-04-051-2/+2
| | | | | | | | | | * library/http2.1/http.tcl: For the -querychannel option, fconfigure the socket to be binary so that we don't translate anything while reading the data. This is because we determine the content length of the data on the channel by using seek (to the end of the file) and tell on the file handle, and we need the content-length to match the amount of data actually sent, and translation can affect the number of bytes posted.
* 2000-03-29 Sandeep Tamhankar <sandeep@scriptics.com>sandeep2000-03-291-4/+3
| | | | | | | | | | | | | * library/http2.1/http.tcl: Removed an unnecessary fileevent statement from the error processing part of the Write method. Also, fixed two potential memory leaks in wait and reset, in which the state array wasn't being unset before throwing an exception. Prior to this version, Brent checked in a fix to catch a fileevent statement that was sometimes causing a stack trace when geturl was called with -timeout. I believe Brent's fix is necessary because TLS closes bad sockets for secure connections, and the fileevent was trying to act on a socket that no longer existed.
* Added catch around fileevent to fix test suite failurewelch2000-03-271-2/+2
|
* 2000-03-22 Sandeep Tamhankar <sandeep@scriptics.com>sandeep2000-03-221-2/+3
| | | | | | * library/http2.1/http.tcl: Fixed a bug where string query data that was bigger than queryblocksize would get duplicate characters at block boundaries.
* 2000-03-22 Sandeep Tamhankar <sandeep@scriptics.com>sandeep2000-03-221-2/+3
| | | | | | | | | | * library/http2.1/http.tcl: Fixed bug 4463, where we were getting a stack trace if we tried to publish a project to a good host but a port where there was no server listening. It turned out the problem was a stray fileevent that needed to be cleared. Also, fixed a bug where http::code could stack trace if called on a bad token (one which didn't represent a successful geturl) by adding an http element to the state array in geturl.
* 2000-03-19 Sandeep Tamhankar <sandeep@scriptics.com>scriptics_sc_2_0_b1sandeep2000-03-191-5/+10
| | | | | | | | * library/http2.1/http.tcl: geturl used to throw an exception when the connection failed; I accidentally returned a token with the error info, breaking backwards compatibility. I changed it back to throwing an exception, but unsetting the state array first (thus still eliminating the original memory leak problem).
* * library/http2.1/http.tcl: Added -querychannel option and alteredsandeep2000-03-191-66/+98
| | | | | | | | | | | | | | | | | | | | | | some of Brent's modifications to allow asynchronous posts (via -command). Also modified -queryprogress so that it calls the query callback as <callback> <token> <total size> <current size> to be consistent with -progress. Added -queryblocksize option with default 8192 bytes for post blocksize. Fixed a bunch of potential memory leaks for the case when geturl receives bad args or can't open a socket, etc. Overall, the package really rocks now. * doc/http.n: Added -queryblocksize, -querychannel, and -queryprogress. Also, changed the description of -blocksize, which states that the -progress callback will be called for each block, to now qualify that with an "if -progress is specified". * tests/http.test: Added a querychannel test for synchronous and asynchronous posts, altered the queryprogress test such that the callback conforms to the -progress format. Also, had to use the -queryblocksize option to do the post 16K at a time to match Brent's expected results (and to test that -queryblocksize works).
* Added -queryprogress callback towelch2000-03-171-4/+90
| | | | | | | | http::geturl and also changed it so that writing the post data is event driven if the queryprogress callback or a timeout is given. This allows a timeout to occur when writing lots of post data. The queryprogress callback is called after each block of query data is posted. It has the same signature as the -progress callback.
* * library/http1.0/http.tcl:hobbs2000-02-011-2/+2
| | | | | * library/http2.1/http.tcl: The query data POSTed was newline terminated when it shouldn't be altered [Bug: 4089]
* * library/http2.1/http.tcl: trim value for $state(meta) keyhobbs2000-01-111-2/+2
|
* * library/http2.1/http.tcl: fixed error handling in http::Eventhobbs1999-12-041-4/+3
| | | | [Bug: 3752]
* *** empty log message ***hobbs1999-11-191-2/+2
|
* * library/http2.1/http.tcl:hobbs1999-11-191-2/+2
| | | | * library/http2.1/pkgIndex.tcl: updated http package to 2.2
* * library/http2.1/http.tcl: added register and unregisterhobbs1999-11-191-9/+61
| | | | | commands to http:: package (better support for tls/SSL), as well as -type argument to http::geturl. [RFE: 2617]
* Improved error handling of http::geturl in the case the server iswelch1999-11-181-34/+134
| | | | | not available. Also correctly fixed the bug between -timeout and a subsequent http::status call.
* *** empty log message ***hobbs1999-11-101-2/+2
|
* Fixed bug in the handling of the status code after an asynchronous connect,welch1999-10-301-3/+2
| | | | e.g., one that is used with the -timeout flag.
* * library/http2.1/http.tcl: protected gets with catch [Bug: 2665]hobbs1999-10-211-2/+4
|
* * library/http2.1/http.tcl: fixed possible use of global c var.hobbs1999-10-051-4/+3
|
* 1999-08-18 Jeff Hobbs <hobbs@scriptics.com>hobbs1999-08-191-14/+10
| | | | | | | | | | | | | * library/auto.tcl: * library/init.tcl: * library/ldAout.tcl: * library/package.tcl: * library/safe.tcl: * library/word.tcl: * library/http2.1/http.tcl: * library/msgcat1.0/msgcat.tcl: updated libraries to better Tcl style guide (no more string comparisons with == or !=, spacing changes).
* 1999-08-05 Jeff Hobbs <hobbs@scriptics.com>hobbs1999-08-051-2/+3
| | | | | * library/http2.1/http.tcl: Made use of "i" in init section not use global var and start at 0 (was 1). [Bug: 2502]
* changed http package version from 2.0 to 2.1hershey1999-07-201-2/+2
|
* Fixed handling of connection timeouts.welch1999-07-071-1/+4
|
* Fixed -timeout bug to handle connections to dead servers properly.welch1999-06-301-9/+67
| | | | Added http::cleanup function
* * library/http2.0/http.tcl: Added catch around eof test instanton1999-02-021-2/+3
| | | | | CopyDone since the user may have already called http::reset. [Bug: 1108]
* Making it possible for http -command callbacks to safelyscriptics_tclpro_1_2_b1welch1999-01-191-2/+5
| | | | uset the state array.
* Replaced SCCS strings, fixed binary filescore_8_0_3stanton1998-09-141-1/+1
|
* expr bracingwelch1998-06-291-15/+15
|
* Initial revisionrjohnson1998-03-261-0/+462