diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-07-16 08:33:13 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-07-16 08:33:13 (GMT) |
commit | da19d0dd6c320026b45f407302a2d0f55d67777f (patch) | |
tree | 19ecb9097ee39ac7b4dd159873af1be0a2802f4f | |
parent | adecc7a1e1a45aab0805e6cb440eb3adf09e486a (diff) | |
parent | 5dff38707576522b97793ce6ad8024b0f92895bb (diff) | |
download | tcl-da19d0dd6c320026b45f407302a2d0f55d67777f.zip tcl-da19d0dd6c320026b45f407302a2d0f55d67777f.tar.gz tcl-da19d0dd6c320026b45f407302a2d0f55d67777f.tar.bz2 |
merge trunk
-rw-r--r-- | ChangeLog | 32 | ||||
-rw-r--r-- | changes | 122 | ||||
-rw-r--r-- | library/http/http.tcl | 7 | ||||
-rwxr-xr-x | library/reg/pkgIndex.tcl | 4 | ||||
-rw-r--r-- | tests/http.test | 7 | ||||
-rw-r--r-- | unix/tclUnixNotfy.c | 4 | ||||
-rw-r--r-- | win/tclWinReg.c | 2 | ||||
-rw-r--r-- | win/tclWinSock.c | 10 |
8 files changed, 167 insertions, 21 deletions
@@ -1,3 +1,30 @@ +2012-07-16 Jan Nijtmans <nijtmans@users.sf.net> + + * library/reg/pkgIndex.tcl: Make registry 1.3 package dynamically + loadable in Tcl 8.4.20. + +2012-07-11 Jan Nijtmans <nijtmans@users.sf.net> + + * win/tclWinReg.c: [Bug #3362446]: registry keys command fails + with 8.5/8.6. Follow Microsofts example better in order to prevent + problems when using HKEY_PERFORMANCE_DATA. + +2012-07-10 Jan Nijtmans <nijtmans@users.sf.net> + + * unix/tclUnixNotfy.c: [Bug 3541646] Don't panic on triggerPipe overrun + +2012-07-10 Donal K. Fellows <dkf@users.sf.net> + + * win/tclWinSock.c (InitializeHostName): Corrected logic that + extracted the name of the computer from the gethostname call so that + it would use the name on success, not failure. Also ensured that the + buffer size is exactly that recommended by Microsoft. + +2012-07-08 Reinhard Max <max@suse.de> + + * library/http/http.tcl: Add fix and test for URLs that contain + * tests/http.test: literal IPv6 addresses. [Bug 3531209] + 2012-07-05 Don Porter <dgp@users.sourceforge.net> * unix/tclUnixPipe.c: [Bug 1189293] Make "<<" binary safe. @@ -836,9 +863,8 @@ 2011-11-30 Jan Nijtmans <nijtmans@users.sf.net> - * library/tcltest/tcltest.tcl: [Bug 967195]: Make tcltest work when - tclsh is compiled without using the setargv() function on mingw (No - need to incr the version, since 2.2.10 is never released). + * library/tcltest/tcltest.tcl: [Bug 967195]: Make tcltest work + when tclsh is compiled without using the setargv() function on mingw. 2011-11-29 Jan Nijtmans <nijtmans@users.sf.net> @@ -7976,17 +7976,131 @@ Many more Tcl built-in command errors now set an -errorcode. like "nano()" instead of parsing as "nan o()" with missing op (duquette,porter) *** POTENTIAL INCOMPATIBILITY *** +2011-09-10 (bug fix)[3400658] wrong num args msg with TclOO (rsooltan,fellows) + 2011-09-13 (bug fix)[3390638] solaris studio cc workaround (kechel,porter) 2011-09-13 (bug fix)[3405652] DTrace workaround (michelson,porter) 2011-09-16 (bug fix)[3391977] -headers overrides -type (ziegenhagen,fellows) -=> http 2.7.7 +=> http 2.8.3 + +2011-09-16 (TIP 388) New \Uhhhhhhhh syntax (nijtmans) -2011-09-16 (bug fix)[3400658] wrong num args msg with TclOO (rsooltan,fellows) +2011-10-06 (enhancement) bytecode compile [dict with] (fellows) 2011-10-11 (bug fix)[2935503] [file stat] returns bad mode (nadkarni,nijtmans) -2011-10-15 tzdata updated to Olson's tzdata2011l (iyer) +2011-10-20 (bug fix)[3418547] cmd lits and custom resolvers (soberning,fellows) + +2011-10-31 (bug fix)[3414754] EIAS violation in fs paths (porter) + +2011-11-22 (bug fix)[2935503] Win: [file mtime] sets wrong time (nijtmans) + +2011-11-30 (bug fix)[967195] Simply args passed to child processes (nijtmans) +=> tcltest 2.3.4 + +2011-12-07 (bug fix)[3444754] fix [string tolower \u01C5] (nijtmans) + +2011-12-11 (update)[3457031] Update [[:print:]] to Unicode 6.0 (nijtmans) + +2011-12-24 (bug fix)[3464428] fix [string is graph \u0120] (nijtmans) + +2012-01-08 (bug fix)[3470928] zoneinfo trouble with Windhoek data file (kenny) + +2012-01-13 (bug fix)[3472316] fix retrieval of socket error (fellows) + +2012-01-21 (bug fix)[3475667] [regexp] buffer read overflow (sebres) + +2012-01-22 (bug fix)[3475264] [dict exists] return 0, not error (fellows) + +2012-01-25 (bug fix)[3474460] [oo::copy] var resolution list (fellows) + +2012-01-26 (bug fix)[3475569,3479689] mem corrupt in fs path (sebres,porter) + +2012-01-30 (enhancement) improve bytecode compile of [catch] (fellows) + +2012-02-02 (bug fix)[2974459,2879351,1951574,1852572,1661378,1613456] Fix +problems where [file *able] would return false results on Win/Samba (porter) + +2012-02-02 (update)[3464401] Support Unicode 6.1 (nijtmans) + +2012-02-06 (bug fix)[3484621] bump bytecode epoch on exec traces (kuhn,sofer) + +2012-02-15 (bug fix)[3487626] crash compiling [dict for] (fellows) + +2012-02-15 (enhancement) bytecode compile [lrange],[lreplace] (fellows) + +2012-02-17 (bug fix)[2233954] compile problem on AIX & Android (nijtmans) + +2012-02-29 (bug fix)[3466099] BOM in Unicode (nijtmans) + +2012-03-07 (bug fix)[3498327] RFC 3986 compliance (kupries) + +2012-03-26 (TIP 380) New builtin class [oo::Slot] (fellows) + *** POTENTIAL INCOMPATIBILITY *** + +2012-03-27 (TIP 397) <cloned> method to extend [oo::copy] (fellows) + *** POTENTIAL INCOMPATIBILITY *** + +2012-03-27 (TIP 395) New subcommand [string is entier] (fellows) + +2012-04-02 (TIP 396) New command [yieldto] (fellows) + +2012-04-04 (bug fix)[3514761] crash combining objects and ensembles (fellows) + +2012-04-09 (bug fix)[2712377] [info vars] and oo variables (fellows) + +2012-04-09 (bug fix)[3396896] no dups in oo var lists (fellows) + +2012-04-11 (bug fix)[3448512] [clock scan 1958-01-01] fail on Win (nijtmans) + +2012-04-15 (bug fix)[3517696] fix flush of zlib chan xform (fellows) + +2012-04-18 tzdata updated to Olson's tzdata2012c (kenny) + +2012-04-28 (TIP 398) exit non-blocking chan without flush (ferrieux) + *** POTENTIAL INCOMPATIBILITY *** + +2012-05-02 (enhancement) Better use of Intel cpuid instruction (nijtmans) + +2012-05-03 (bug fix)[3428753] Unbreak synchronous [socket -async] (porter) + +2012-05-10 (bug fix)[2812981] force consistent config of Tcl+pkgs (ferrieux) + +2012-05-10 (bug fix)[473946] correct send of special characters (nijtmans) + +2012-05-17 (bug fix)[3445787] fix [file] ensemble in Safe Base (fellows) + +2012-05-17 (bug fix)[2964715] fix [glob] in Safe Base (fellows) + +2012-05-17 (bug fix)[3106532] proper [switch -indexvar] values (fellows) + *** POTENTIAL INCOMPATIBILITY *** + +2012-05-21 (TIP 106) New -binary option to [dde execute|poke] (oehlmann) +=> dde 1.4.0 + +2012-05-23 (bug fix)[3525907] [zlib push decompress] & [chan event] +(fellows,ferrieux,kupries) + +2012-05-28 (bug fix)[3529949] Protect ~ paths in Safe Base (fellows) + +2012-06-21 (bug fix)[3362446] [registry keys] failure (nijtmans) +=> registry 1.3.0 + +2012-06-25 (bug fix)[3537605] [encoding dirs a b] error message (fellows) + +2012-06-25 (bug fix)[3024359] crash when multi-thread concurrent [file system] +and Tcl_FSMountsChanged(). (porter) + +2012-06-29 (bug fix)[3536888] fix locale guessing (oehlmann,nijtmans) +=> msgcat 1.4.5 + +2012-07-05 (bug fix)[1189293] make "<<" redirect binary safe (porter) + +2012-07-08 (bug fix)[3531209] accept IPv6 URLs (max) +=> http 2.8.4 + +Many revisions to better support a Cygwin environment (nijtmans) ---- Released 8.6b3, November 20, 2011 --- See ChangeLog for details --- +--- Released 8.6b3, July 30, 2012 --- See ChangeLog for details --- diff --git a/library/http/http.tcl b/library/http/http.tcl index b5ce82b..2653c3e 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -419,7 +419,6 @@ proc http::geturl {url args} { # Note that the RE actually combines the user and password parts, as # recommended in RFC 3986. Indeed, that RFC states that putting passwords # in URLs is a Really Bad Idea, something with which I would agree utterly. - # Also note that we do not currently support IPv6 addresses. # # From a validation perspective, we need to ensure that the parts of the # URL that are going to the server are correctly encoded. This is only @@ -434,7 +433,10 @@ proc http::geturl {url args} { [^@/\#?]+ # <userinfo part of authority> ) @ )? - ( [^/:\#?]+ ) # <host part of authority> + ( # <host part of authority> + [^/:\#?]+ | # host name or IPv4 address + \[ [^/\#?]+ \] # IPv6 address in square brackets + ) (?: : (\d+) )? # <port part of authority> )? ( / [^\#]*)? # <path> (including query) @@ -448,6 +450,7 @@ proc http::geturl {url args} { return -code error "Unsupported URL: $url" } # Phase two: validate + set host [string trim $host {[]}]; # strip square brackets from IPv6 address if {$host eq ""} { # Caller has to provide a host name; we do not have a "default host" # that would enable us to handle relative URLs. diff --git a/library/reg/pkgIndex.tcl b/library/reg/pkgIndex.tcl index f71b09f..55af4b3 100755 --- a/library/reg/pkgIndex.tcl +++ b/library/reg/pkgIndex.tcl @@ -1,5 +1,5 @@ -if {![package vsatisfies [package provide Tcl] 8.5]} return -if {[info sharedlibextension] ne ".dll"} return +if {([info commands ::tcl::pkgconfig] eq "") + || ([info sharedlibextension] ne ".dll")} return if {[::tcl::pkgconfig get debug]} { package ifneeded registry 1.3.0 \ [list load [file join $dir tclreg13g.dll] registry] diff --git a/tests/http.test b/tests/http.test index 37d4a05..fe44b47 100644 --- a/tests/http.test +++ b/tests/http.test @@ -135,6 +135,7 @@ set fullurl http://user:pass@[info hostname]:$port/a/b/c set binurl //[info hostname]:$port/binary set posturl //[info hostname]:$port/post set badposturl //[info hostname]:$port/droppost +set ipv6url http://\[::1\]:$port/ test http-3.4 {http::geturl} -body { set token [http::geturl $url] http::data $token @@ -390,6 +391,12 @@ Connection close Content-Type {text/plain;charset=utf-8} Accept-Encoding .* Content-Length 5} +test http-3.29 "http::geturl $ipv6url" -body { + set token [http::geturl $ipv6url -validate 1] + http::code $token +} -cleanup { + http::cleanup $token +} -result "HTTP/1.0 200 OK" test http-4.1 {http::Event} -body { set token [http::geturl $url -keepalive 0] diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index c1bc430..ca95f40 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -895,7 +895,7 @@ Tcl_WaitForEvent( waitingListPtr = tsdPtr; tsdPtr->onList = 1; - if (write(triggerPipe, "", 1) != 1) { + if ((write(triggerPipe, "", 1) == -1) && (errno != EAGAIN)) { Tcl_Panic("Tcl_WaitForEvent: %s", "unable to write to triggerPipe"); } @@ -958,7 +958,7 @@ Tcl_WaitForEvent( } tsdPtr->nextPtr = tsdPtr->prevPtr = NULL; tsdPtr->onList = 0; - if (write(triggerPipe, "", 1) != 1) { + if ((write(triggerPipe, "", 1) == -1) && (errno != EAGAIN)) { Tcl_Panic("Tcl_WaitForEvent: %s", "unable to write to triggerPipe"); } diff --git a/win/tclWinReg.c b/win/tclWinReg.c index 565188c..d2f233e 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -780,7 +780,7 @@ GetValue( * HKEY_PERFORMANCE_DATA */ - length *= 2; + length = Tcl_DStringLength(&data) * (2 / sizeof(TCHAR)); Tcl_DStringSetLength(&data, (int) length * sizeof(TCHAR)); result = RegQueryValueEx(key, nativeValue, NULL, &type, (BYTE *) Tcl_DStringValue(&data), &length); diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 9b181a6..97b10a3 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -2579,20 +2579,16 @@ InitializeHostName( Tcl_DStringInit(&ds); if (TclpHasSockets(NULL) == TCL_OK) { /* - * Buffer length of 255 copied slavishly from previous version of - * this routine. Presumably there's a more "correct" macro value - * for a properly sized buffer for a gethostname() call. - * Maintainers are welcome to supply it. + * The buffer size of 256 is recommended by the MSDN page that + * documents gethostname() as being always adequate. */ Tcl_DString inDs; Tcl_DStringInit(&inDs); - Tcl_DStringSetLength(&inDs, 255); + Tcl_DStringSetLength(&inDs, 256); if (gethostname(Tcl_DStringValue(&inDs), Tcl_DStringLength(&inDs)) == 0) { - TclDStringClear(&ds); - } else { Tcl_ExternalToUtfDString(NULL, Tcl_DStringValue(&inDs), -1, &ds); } |