tclhttpd

View Ticket
Login

View Ticket

Ticket Hash: a51d9ca89aa0443ce907ad89023d72f84bba81f9
Title: Error in tclhttpd, mini1.1.tcl file
Status: Closed Type: Code_Defect
Severity: Cosmetic Priority: Zero
Subsystem: --other-- Resolution: Misconfiguration
Last Modified: 2024-01-28 16:05:02
Version Found In: ffc189660f
User Comments:
anonymous added on 2019-06-03 13:56:23:
Looking at mini1.1.tcl in tclhttpd (https://core.tcl.tk/tclhttpd/dir?ci=ffc189660f15a776&name=bin/mini), search the the line: 

    append data(mime,$data($key)) " " $value 

it should be 
    append data(mime,$data(key)) " " $value 

From Ralf Fassel: Looks like an obvious copy/paste error to me (data(key) is set in the first branch as a lookup-cache for the second branch).

anonymous added on 2019-06-07 09:34:58:
Proposed patch:

--- tclhttpd3.5.1/bin/mini/mini1.1.tcl~
+++ tclhttpd3.5.1/bin/mini/mini1.1.tcl
@@ -104,7 +104,7 @@
 		    }
 		} elseif {[regexp {^[ 	]+(.+)} $line {} value] && \
 			[info exists data(key)]} {
-		    append data(mime,$data($key)) " " $value
+		    append data(mime,$data(key)) " " $value
 		} else {
 		    HttpdError $sock 400 $line
 		}

Diff finished.  Fri Jun  7 11:29:42 2019