diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index a214e380d7..215c3d454d 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -88,8 +88,8 @@ ERROR: I/O error: [ "primitive_read_line_fd_8" "Resource temporarily unavailable + httpd: +- broken pipe errors with httpd and telnetd in cfactor - multitasking -- don't die if one client errors - inspect: always use inspect/ URL prefix, not responder name var - httpd: don't flush so much - log with date diff --git a/library/httpd/httpd.factor b/library/httpd/httpd.factor index 605d60303e..543ad70efa 100644 --- a/library/httpd/httpd.factor +++ b/library/httpd/httpd.factor @@ -76,9 +76,13 @@ USE: url-encoding : httpd-client ( socket -- ) [ - "stdio" get "client" set log-client - read [ parse-request ] when* - ] with-stream ; + [ + "stdio" get "client" set log-client + read [ parse-request ] when* + ] with-stream + ] [ + default-error-handler drop + ] catch ; : quit-flag ( -- ? ) global [ "httpd-quit" get ] bind ;