Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2022-11-15
23:27 • Ticket [3f6bb3bb46] Http 2.10a4 doesn't work with Tcl 8.6 status still C... artifact: 1f8da60b0b user: kjnash
21:54 • Closed ticket [3f6bb3bb46]. artifact: 3380cbe621 user: jan.nijtmans
21:41 • Add attachment tcl8.6.13.patch to ticket [3f6bb3bb46] artifact: 579045f4b2 user: kjnash
21:39 • Ticket [3f6bb3bb46] Http 2.10a4 doesn't work with Tcl 8.6 status still P... artifact: 846a49372a user: kjnash
21:25 • Pending ticket [3f6bb3bb46]. artifact: 228caf33c9 user: kjnash
21:24 • Ticket [3f6bb3bb46]: 3 changes artifact: d358a44782 user: kjnash
15:03 • Ticket [3f6bb3bb46]: 3 changes artifact: aa1d96c8bb user: jan.nijtmans
15:02 • New ticket [3f6bb3bb46]. artifact: 9d1bf07f8d user: jan.nijtmans

Http 2.10a4 doesn't work with Tcl 8.6

Closed / Fixed3f6bb3bb46f4c2840dde85cc890c4716fab636a6Created 4 years agoUpdated 4 years ago
Descriptionwiki2022-11-15 15:02:12
Allthough the http package version 2.10a4 advertises to work with Tcl 8.6 (package require Tcl 8.6-), it doesn't work. Testcases in http11.test hang.

The http package should either do a "package require Tcl 8.7-" or it should be fixed to run fine with Tcl 8.6 too. Otherwise, when someone installs both Tcl 8.6 and 8.7, the http package will be broken with Tcl 8.6.

jan.nijtmanswiki2022-11-15 15:03:07

The hang happens on all platforms. See: https://github.com/tcltk/tcl/actions/runs/3459694409

kjnashplain2022-11-15 21:24:43
Commit [2bac0bed17] fixes the issues with http11.test.  The simple httpd used for testing silently fails because it has "package require tcl" not "package require Tcl".
kjnash Pending ticket [3f6bb3bb46]. [History diff]2022-11-15 21:25:26
kjnashplain2022-11-15 21:39:22
I had a go at the backport recently, but I did not upload the code to fossil because I had not yet tested it on Windows.

My procedure was:

1. Start with 8.6.13rc0
2. Copy these files from 8.7:

library/http/http.tcl
library/http/pkgIndex.tcl
library/cookiejar/cookiejar.tcl
library/cookiejar/idna.tcl
library/cookiejar/pkgIndex.tcl
library/cookiejar/public_suffix_list.dat.gz
doc/http.n
doc/cookiejar.n
doc/idna.n
tests/http11.test
tests/httpcookie.test
tests/httpd
tests/httpd11.tcl
tests/httpPipeline.test
tests/httpProxySquidConfigForEL8.tar.gz
tests/httpProxy.test
tests/http.test
tests/httpTestScript.tcl
tests/httpTest.tcl

3. Apply the patch supplied below as a file.  This applies the "package require Tcl" fix mentioned below and adds a lpop command to tests/httpd11.tcl so that the tests themselves are unchanged.  It also patches the makefile.*.  The makefile patches for Windows are untested.
jan.nijtmanswiki2022-11-15 21:54:37

Thanks! So, it was a problem in the testcase, not in the http code itself.

Good to know! Please don't backport it to 8.6 yet, it's better to leave it in Tcl 8.7 first until 8.7 reaches the stable version.

Anyway, since the problem is solved, closing!

kjnashplain2022-11-15 23:27:10
Yes, agreed, I would have worked in a separate branch but you've done it first.

I hope that when Tcl 8.7 is released, Tcl 8.6 will adopt http 2.10 and anything else that can easily be backported, but those decisions will be for the Core Team!
Log in (anonymous is fine) to add a comment.

Attachments: