Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2022-09-10
11:52 • Closed ticket [1214322fff]: Provide descriptions of error codes plus 9 other... artifact: bbb665285e user: kjnash
2022-09-08
17:51
Add command http::reason to return the recommended reason phrase for a HTTP server status code (bug ... check-in: ff9bdad66a user: kjnash tags: http-bugfixes-2022H2
2005-06-03
15:17 • New ticket [1214322fff] Provide descriptions of error codes. artifact: cd7bf5b38d user: davidw

Provide descriptions of error codes

Closed / Fixed1214322fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 4 years ago
Descriptionplain2005-06-03 15:17:21
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
kjnashplain2022-09-10 11:52:52
Command http::reason provided in commit [ff9bdad66a], branch http-bugfixes-2022H2.
Log in (anonymous is fine) to add a comment.