Tcl Source Code

View Ticket
Login
Ticket UUID: 5350f321532112b7389c4885a1aa7cd8245da806
Title: http-4.14.0 fails on NetBSD: $port+1 is the port of the outer httpd
Type: Bug Created on: 2026-10-12 09:47:00
Submitter: serhiy.storchaka Assigned to: jan.nijtmans
Subsystem: 29. http Package Severity: Minor
Priority: 5 Medium Last modified: 2026-10-19 13:09:09
Status: Closed Closed by: jan.nijtmans
Resolution: Fixed Closed on: 2026-10-19 13:09:09
Version: 9.1.0
Description:

http-4.14.0 fails on NetBSD: http::error is empty instead of connect failed: connection refused.

The test uses $port+1 as a port without a listener. http.test starts an httpd, then sources itself for each ThreadLevel, which starts another httpd. NetBSD allocates ephemeral ports in descending order, so the httpd of ThreadLevel 0 gets the outer port minus 1, and $port+1 is the port of the outer httpd, which answers the request.

Proposed fix in branch http-test-bad-port: use a port just released by the OS for badurl.

User Comments:
jan.nijtmans added on 2026-10-19 13:09:09:

Merged to [9d697dacb4|trunk], core-9-0-branch and core-8-6-branch.

Many thanks!