You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/tsweb
Paul Scott d97cddd876 tsweb: swallow panics
With this change, the error handling and request logging are all done in defers
after calling inner.ServeHTTP. This ensures that any recovered values which we
want to re-panic with retain a useful stacktrace.  However, we now only
re-panic from errorHandler when there's no outside logHandler. Which if you're
using StdHandler there always is. We prefer this to ensure that we are able to
write a 500 Internal Server Error to the client. If a panic hits http.Server
then the response is not sent back.

Updates #12784

Signed-off-by: Paul Scott <paul@tailscale.com>
4 months ago
..
promvarz derp/xdp,cmd/xdpderper: initial skeleton (#12390) 5 months ago
varz tsweb/varz: add charset=utf-8 to varz handler 8 months ago
debug.go Revert "tsweb: update ServeMux matching to 1.22.0 syntax (#11090)" (#11125) 9 months ago
debug_test.go all: update copyright and license headers 2 years ago
log.go tsweb: rename AccessLogRecord's When to Time 6 months ago
request_id.go tsweb: switch to fastuuid for request ID generation 8 months ago
tsweb.go tsweb: swallow panics 4 months ago
tsweb_test.go tsweb: swallow panics 4 months ago