Tcl Source Code

View Ticket
Login
Ticket UUID: 1214322
Title: Provide descriptions of error codes
Type: RFE Created on: 2005-06-03 15:17:21
Submitter: davidw Assigned to: aku
Subsystem: 29. http Package Severity: Minor
Priority: 5 Medium Last modified: 2022-09-10 11:52:52
Status: Closed Closed by: kjnash
Resolution: Fixed Closed on: 2022-09-10 11:52:52
Version: None
Description:
Hi, a small API such as this would be handy:

array set errs {
    401 "Not authorized to access this directory"
    403 "Forbidden"
    404 "File not found"
    500 "Internal server error"
    501 "Not implemented"
}

if { ! [info exists errs($ncode)] } {
    set errmsg "numeric: $ncode"
} else {
    set errmsg $errs($ncode)
}

Thanks,
Dave
User Comments:
kjnash added on 2022-09-10 11:52:52:
Command http::reason provided in commit [ff9bdad66a], branch http-bugfixes-2022H2.